diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-02-11 04:56:07 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-02-11 04:56:07 +0000 |
commit | 771bef794b7edb7ef6cbe78acf2ee93b39f10f74 (patch) | |
tree | 1760f275801be77be57e79a721a62e541c1048ab /externals/grill/flext/source/fltimer.cpp | |
parent | 18fe78414549e0d1630e35ae51c3268abecafa63 (diff) |
Max: use high-priority click instead of qelem for message-posting
fixed flext::Timer::At method
svn path=/trunk/; revision=2566
Diffstat (limited to 'externals/grill/flext/source/fltimer.cpp')
-rwxr-xr-x | externals/grill/flext/source/fltimer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/externals/grill/flext/source/fltimer.cpp b/externals/grill/flext/source/fltimer.cpp index c317df45..294da438 100755 --- a/externals/grill/flext/source/fltimer.cpp +++ b/externals/grill/flext/source/fltimer.cpp @@ -162,9 +162,11 @@ bool flext::Timer::At(double tm,void *data,bool dopast) userdata = data; period = 0; #if FLEXT_SYS == FLEXT_SYS_PD - const double ms = tm*1000.; - if(dopast || clock_gettimesince(ms) <= 0) - clock_set(clk,ms); + const double systm = clock_gettimesince(0); + double df = tm*1000.-systm; + if(dopast && df < 0) df = 0; + if(df >= 0) + clock_delay(clk,df); #elif FLEXT_SYS == FLEXT_SYS_MAX const double ms = tm*1000.; double cur; |