windows sigar_time_now_millis impl
This commit is contained in:
1 parent
15f7996b8a
commit
b37c690749
2 files changed
+11
-3
No files matched your search
+2
-3
@@ -813,12 +813,11 @@ SIGAR_DECLARE(void) sigar_log_impl_file(sigar_t *sigar, void *data,
|
||||
fprintf(fp, "[%s] %s\n", log_levels[level], message);
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
sigar_int64_t sigar_time_now_millis(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#else
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
return ((tv.tv_sec * SIGAR_USEC) + tv.tv_usec) / SIGAR_MSEC;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user