diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-15 23:00:47 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-15 23:00:47 +0000 |
commit | ff15e0fa53156b9994da3f726bfe91232de6195a (patch) | |
tree | 896015cada90b49858e1bf6503d9583704a56179 /asterisk.c | |
parent | c05cf07847cb384ba66aa29d5eda580eda413ffb (diff) |
add a library of timeval manipulation functions, and change a large number of usses to use the new functions (bug #4504)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6146 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rwxr-xr-x | asterisk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/asterisk.c b/asterisk.c index d9d4426e5..60a2edb5b 100755 --- a/asterisk.c +++ b/asterisk.c @@ -1199,7 +1199,7 @@ static char *cli_prompt(EditLine *el) break; case 'd': /* date */ memset(&tm, 0, sizeof(struct tm)); - gettimeofday(&tv, NULL); + tv = ast_tvnow(); if (localtime_r(&(tv.tv_sec), &tm)) { strftime(p, sizeof(prompt) - strlen(prompt), "%Y-%m-%d", &tm); } @@ -1256,7 +1256,7 @@ static char *cli_prompt(EditLine *el) #endif case 't': /* time */ memset(&tm, 0, sizeof(struct tm)); - gettimeofday(&tv, NULL); + tv = ast_tvnow(); if (localtime_r(&(tv.tv_sec), &tm)) { strftime(p, sizeof(prompt) - strlen(prompt), "%H:%M:%S", &tm); } |