|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
11 static volatile int dt_sec;
12 static volatile int dt_ticks;
13 static volatile int dt_cog = 0;
14 static volatile int dt_ets_sys;
16 static int stack[174+20];
18 void secondctr(
void *par)
20 dt_ets_sys = (int) par;
45 dt_cog = 1 +
cogstart(secondctr, (
int*) et, stack,
sizeof(stack));
61 return (cnt - t) / (
CLKFREQ / 1000);
int dt_toEt(datetime dt)
Get the Unix epoch time (number of seconds from Midnight, 1/1/1970) from a datetime type....
void dt_run(datetime dt)
datetime Type definition of datetime_st structure.
int dt_getms()
Get the number of ms into the current second from the system time second. Notes: This assumes that a ...
#define CLKFREQ
Returns the current clock frequency.
datetime dt_fromEt(int et)
Get the datetime representation of an a Unix epoch time (number of seconds from Midnight,...
This library provides convenient functions for a variety of timekeeping operations....
datetime_st Structure containing y, mo, h, m, and s elements.
#define waitcnt(a)
Wait until system counter reaches a value.
void dt_set(datetime dt)
Set the system date and time. This can be used to change the system's current date/time....
#define cogstop(a)
Stop a COG.
datetime dt_get()
Get the current system time. To find the current system time (as a datetime type),...
#define CNT
The system clock count.
void dt_end()
Stop a date/time second counting process and recover the cog and lock.
int cogstart(void(*func)(void *), void *par, void *stack, size_t stacksize)
Start a new propeller LMM function/thread in another COG.