mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:53:44 +03:00
curltime: use libcurl time functions in src and tests/server
The curl tool and tests/server used 2 parallel implementations of libcurl's `Curl_now()` and `Curl_timediff()` functions. Make them use the libcurl one. Closes #16653
This commit is contained in:
parent
b1faac8039
commit
436d4a360a
20 changed files with 129 additions and 292 deletions
|
|
@ -25,25 +25,11 @@
|
|||
***************************************************************************/
|
||||
#include "tool_setup.h"
|
||||
|
||||
/**
|
||||
* Return timeval of the MONOTONIC timer, depending on platform
|
||||
* this may be completely unrelated to the REALTIME.
|
||||
*/
|
||||
struct timeval tvnow(void);
|
||||
|
||||
/**
|
||||
* Return timeval of the REALTIME clock.
|
||||
*/
|
||||
struct timeval tvrealnow(void);
|
||||
|
||||
/*
|
||||
* Make sure that the first argument (t1) is the more recent time and t2 is
|
||||
* the older time, as otherwise you get a weird negative time-diff back...
|
||||
*
|
||||
* Returns: the time difference in number of milliseconds.
|
||||
*/
|
||||
long tvdiff(struct timeval t1, struct timeval t2);
|
||||
|
||||
/* Case insensitive comparison support. */
|
||||
int struplocompare(const char *p1, const char *p2);
|
||||
int struplocompare4sort(const void *p1, const void *p2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue