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