39#define kvi_unixTime() time(0)
40#define kvi_timeSpan(_time_now, _time_before) ((_time_now) - (_time_before))
41#define kvi_secondsSince(_that_time_t) kvi_timeSpan(kvi_unixTime(), _that_time_t)
43#define kvi_time_t time_t
45#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
66 gettimeofday(tmv,
nullptr);
125 unsigned int * uD,
unsigned int * uH,
unsigned int * uM,
unsigned int * uS);
void kvi_gettimeofday(struct timeval *tmv)
Gets the time of the day.
Definition KviTimeUtils.h:64
A class to retrieve the time interval This works for time intervals a bit longer than 24 days.
Definition KviTimeUtils.h:76
unsigned long secondsCounter()
Returns the number of seconds This wors ONLY in the same second that mark was called in and returns t...
Definition KviTimeUtils.h:100
unsigned long m_uReferenceUSecs
Definition KviTimeUtils.h:82
unsigned long m_uReferenceSecs
Definition KviTimeUtils.h:81
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124
Time utilities.
Definition KviTimeUtils.cpp:82
long long getCurrentTimeMills()
Returns the current time mills.
Definition KviTimeUtils.cpp:83
void secondsToDaysHoursMinsSecs(unsigned int uSecs, unsigned int *uD, unsigned int *uH, unsigned int *uM, unsigned int *uS)
Splits the time span uSecs in days, hours, minutes and seconds.
Definition KviTimeUtils.cpp:91
QString formatTimeInterval(unsigned int uSeconds, int iFlags)
Returns a string formatted like x d x h xx m xx s.
Definition KviTimeUtils.cpp:102
FormatTimeSpanFlags
Definition KviTimeUtils.h:129
@ FillWithHypens
Definition KviTimeUtils.h:132
@ NoLeadingEmptyIntervals
Definition KviTimeUtils.h:130
@ NoLeadingZeroes
Definition KviTimeUtils.h:131