1,12 → 1,5 |
/* TIMERS PaulCodeman */ |
/** |
void Timers::revise(void) -> This function revising all timers. |
void Timers::getTime(void) -> This function updating current time for timers. |
dword set(dword,dword,byte); -> This function seting timer for function Timers::revise. |
dword clear(dword); -> This function clearning anything timer. |
--------- |
The functions setTimeout,setInterval,clearInterval,clearTimeout implementing functional JavaScript. |
*/ |
|
#define offsetSizeTimers 4*3+1 |
#define defaultMaxTimers 1000 |
:struct Timers |
15,8 → 8,8 |
dword alloc; |
dword count; |
dword size; |
void revise(void); |
void getTime(void); |
void watch(void); |
void getTime(); |
dword set(dword,dword,byte); |
dword clear(dword); |
}; |
27,7 → 20,7 |
$int 0x40 |
time = EAX; |
} |
void Timers::revise(void) |
void Timers::watch(void) |
{ |
dword position = 0; |
dword i = 0; |
81,7 → 74,7 |
} |
dword Timers::clear(dword id) |
{ |
IF (!alloc) || (!id) || (!DSDWORD[id]) RETURN 0; |
IF (!alloc) || (!DSDWORD[id]) RETURN 0; |
count--; |
DSDWORD[id] = 0; |
RETURN id; |