24 #if defined(__cplusplus) 46 #define HOURS 60 * MINUTES 53 #define DAYS 24 * HOURS 186 #ifndef DOXYGEN_SHOULD_SKIP_THIS 189 #define _eunix 2440588 193 #define _edos 2444240 197 #define _eunix 2440588 201 #define _eprop 2451545 205 #define _epoch _eunix 208 void secondctr(
void *par);
210 int dte_toJD(
int y,
int m,
int d);
211 int dte_toSPD(
int h,
int m,
int s);
212 int dte_toCal(
int jd);
213 int dte_dateETV(
int etv);
214 int dte_timeETV(
int etv);
217 #endif // DOXYGEN_SHOULD_SKIP_THIS 219 #if defined(__cplusplus) void dt_toTimeStr(datetime dt, char *s)
Populates a string (minimum 9 characters) with the hh:mm:ss representation of a datetime type's time...
void dt_end()
Stop a date/time second counting process and recover the cog and lock.
datetime dt_get()
Get the current system time. To find the current system time (as a datetime type), call this function. Note: This assumes that a call to dt_run has been made. This is common near the beginning of a program that uses the system timekeeping.
struct datetime_st datetime
< datetime_st Structure containing y, mo, h, m, and s elements.
void dt_run(datetime dt)
Run a date/time second counting process in another cog. Example: datetime dts = {2015, 9, 25, 8, 11, 04}; dt_run(dts);.
datetime dt_fromDateStr(datetime dt, char *s)
Populates the y, mo, and d fields in a datetime type with value representations of the characters in ...
int dt_getms()
Get the number of ms into the current second from the system time second. Notes: This assumes that a ...
int dt_toEt(datetime dt)
Get the Unix epoch time (number of seconds from Midnight, 1/1/1970) from a datetime type...
< datetime_st Structure containing y, mo, h, m, and s elements.
datetime dt_fromEt(int et)
Get the datetime representation of an a Unix epoch time (number of seconds from Midnight, 1/1/1970).
void dt_toDateStr(datetime dt, char *s)
Populates a string (minimum 9 characters) with the mm/dd/yy representation of a datetime type's date...
datetime dt_fromTimeStr(datetime dt, char *s)
Populates the time fields (h, m, and s) in a datetime type with value representations of the characte...
void dt_set(datetime dt)
Set the system date and time. This can be used to change the system's current date/time. Example datetime mydt={2015, 9, 25, 8, 13, 51}; dt_set(mydt); You can also use this to change the datetime type that was used in dt_start to "set" the second counter that auto-increments.