Ecere Software
/
sdk
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ide: add -debug-hide-ide command line switch.
[sdk]
/
extras
/
timeTools.ec
1
#ifdef ECERE_STATIC
2
public import static "ecere"
3
#else
4
public import "ecere"
5
#endif
6
7
Time QuickTime()
8
{
9
DateTime time;
10
time.GetLocalTime();
11
return time.hour * 60 * 60 + time.minute * 60 + time.second;
12
}
13
14
public class TimeGate
15
{
16
private:
17
Time from;
18
public:
19
Time delay;
20
21
property bool elapsed
22
{
23
get
24
{
25
Time time = GetTime();
26
if(!from || time - from > delay)
27
{
28
from = time;
29
return true;
30
}
31
return false;
32
}
33
}
34
}