[Modcplusplus-devel] (johnksterling) apr_cplusplus/src/times cpp_times.cpp
Brought to you by:
gr84b8,
johnksterling
From: Mod C. C. L. <mod...@so...> - 2003-11-15 15:41:33
|
Mod Cplusplus CVS committal Author : johnksterling Project : apr_cplusplus Module : src Dir : apr_cplusplus/src/times Modified Files: cpp_times.cpp Log Message: fix this to compile since there is some interest in looking at it again =================================================================== RCS file: /cvsroot/modcplusplus/apr_cplusplus/src/times/cpp_times.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- cpp_times.cpp 19 Feb 2002 04:14:42 -0000 1.1 +++ cpp_times.cpp 15 Nov 2003 15:41:32 -0000 1.2 @@ -14,17 +14,17 @@ APRTime::APRTime(apr_pool_t *pPool, time_t pAnsiTime) { mPool = pPool; - apr_status_t status = apr_ansi_time_to_apr_time(&mTime, pAnsiTime); + apr_status_t status = apr_time_ansi_put(&mTime, pAnsiTime); mXTime = NULL; if (status != APR_SUCCESS) { /* throw exception ? */ } } -APRTime::APRTime(apr_pool_t *pPool, apr_exploded_time_t *pExplodedTime) { +APRTime::APRTime(apr_pool_t *pPool, apr_time_exp_t *pExplodedTime) { mPool = pPool; mXTime = pExplodedTime;; - apr_status_t status = apr_implode_time(&mTime, mXTime); + apr_status_t status = apr_time_exp_get(&mTime, mXTime); if (status != APR_SUCCESS) { /* throw exception ? */ } @@ -42,16 +42,16 @@ if (mXTime) { return; } - mXTime = (apr_exploded_time_t *)apr_pcalloc(mPool, sizeof(*mXTime)); + mXTime = (apr_time_exp_t *)apr_pcalloc(mPool, sizeof(*mXTime)); apr_status_t status = apr_explode_localtime(mXTime, mTime); if (status != APR_SUCCESS) { /* XXX throw exception */ } } -apr_exploded_time_t *APRTime::ExplodedTime(apr_int32_t offset) { - apr_exploded_time_t *xt = - (apr_exploded_time_t *)apr_pcalloc(mPool, sizeof(*xt)); +apr_time_exp_t *APRTime::ExplodedTime(apr_int32_t offset) { + apr_time_exp_t *xt = + (apr_time_exp_t *)apr_pcalloc(mPool, sizeof(*xt)); /* though mXTime may already be set, use APR fn rather than perform our * own logic. the goal is to wrap. */ @@ -62,20 +62,20 @@ return xt; } -apr_exploded_time_t *APRTime::ExplodedGMTTime(void) { - apr_exploded_time_t *xt = - (apr_exploded_time_t *)apr_pcalloc(mPool, sizeof(*xt)); +apr_time_exp_t *APRTime::ExplodedGMTTime(void) { + apr_time_exp_t *xt = + (apr_time_exp_t *)apr_pcalloc(mPool, sizeof(*xt)); /* though mXTime may already be set, use APR fn rather than perform our * own logic. the goal is to wrap. */ - apr_status_t status = apr_explode_gmt(xt, mTime); + apr_status_t status = apr_time_exp_gmt(xt, mTime); if (status != APR_SUCCESS) { /* XXX throw exception */ } return xt; } -apr_exploded_time_t *APRTime::ExplodedLocalTime(void) { +apr_time_exp_t *APRTime::ExplodedLocalTime(void) { explode(); return mXTime; } @@ -114,7 +114,7 @@ apr_sleep(mTime); } -/* below are members of localtime apr_exploded_time_t */ +/* below are members of localtime apr_time_exp_t */ apr_int32_t APRTime::LocalMicroSeconds(void) { explode(); return mXTime->tm_usec; |