CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
time.h File Reference

Time manipulation and conversion functions. More...

#include <time.h>
#include "cx/cx.h"

Go to the source code of this file.

Data Structures

struct  TimeParts
 Decomposed time structure with individual date/time components. More...
 

Macros

#define timeForever   9223372036854775807LL
 Maximum representable time value (approximately year 294,276 CE)
 
#define timeS(s)   timeFromSeconds(s)
 
#define timeMS(ms)   timeFromMsec(ms)
 

Typedefs

typedef struct TimeParts TimeParts
 Decomposed time structure with individual date/time components.
 

Enumerations

enum  WEEKDAYS {
  Sunday = 0 , Monday , Tuesday , Wednesday ,
  Thursday , Friday , Saturday
}
 Days of the week (0-6) More...
 

Functions

bool timeDecompose (TimeParts *out, _In_range_(0, timeForever) int64 time)
 
int64 timeCompose (TimeParts *parts)
 
int64 timeLocal (int64 time, int64 *offset)
 
int64 timeToSeconds (int64 time)
 
int64 timeFromSeconds (int64 seconds)
 
int64 timeToMsec (int64 time)
 
int64 timeFromMsec (int64 msec)
 
int64 timeFromRelTimespec (struct timespec *ts)
 
void timeToRelTimespec (struct timespec *ts, int64 time)
 
int64 timeFromAbsTimespec (struct timespec *ts)
 
void timeToAbsTimespec (struct timespec *ts, int64 time)
 
int64 timeFromTimeT (time_t tt)
 
time_t timeToTimeT (int64 time)
 

Variables

strref timeDayName []
 Full names of days of the week (indexed by WEEKDAYS enum)
 
strref timeDayAbbrev []
 Three-letter abbreviations of days of the week (indexed by WEEKDAYS enum)
 
strref timeMonthName []
 Full names of months (indexed 1-12, index 0 is empty string)
 
strref timeMonthAbbrev []
 Three-letter abbreviations of months (indexed 1-12, index 0 is empty string)
 

Detailed Description

Time manipulation and conversion functions.

Definition in file time.h.