MLIB
Loading...
Searching...
No Matches
tvops.cpp File Reference

Operations on timeval structure. More...

#include <mlib/mlib.h>
#include <assert.h>

Macros

#define FILETIME_1970   0x019db1ded53e8000
 100ns intervals between 1/1/1601 and 1/1/1970 as reported by SystemTimeToFileTime()
 
#define ONE_SECOND   ((long)1000000)
 

Functions

timeval fromsystime (const SYSTEMTIME &st)
 Convert from UTC system time to Unix time scale (UTC form 01/01/70)
 
void tosystime (const timeval &tv, SYSTEMTIME *st)
 Convert from timeval format to SYSTEMTIME format.
 
timeval zone_bias ()
 Return time zone bias.
 
void tolocaltime (const timeval &tv, SYSTEMTIME *st)
 Convert to local time (in a SYSTEMTIME structure)
 
void normalize (timeval &tv)
 Following an arithmetic operation, brings timeval structure to a canonical form where tv_usec is less than 1000000 and has the same sign as tv_sec member.
 

Detailed Description

Operations on timeval structure.

(c) Mircea Neacsu 2002-2024. All rights reserved.