Hello zou, Wednesday, July 4, 2007, 4:25:34 AM, you wrote: zl> May I suggest you use VM::getTime() instead of gettimeofday()?
Agree, I committed a patch. zl> VM::getTime() returns the number of milliseconds since VM was zl> started, it should be sufficient for this case. If not, then consider zl> tu_timer::get_ticks(); zl> gettimeofday() only works under the Unix world, don't forget the zl> win32 users, we need to support them IIRC. I see tu_timer::get_ticks() uses gettimeofday() itself (under Linux). This is not a real issue, but the problem with gettimeofday() is that it can change unexpectedly (ntpdate, for instance) which means that successive calls to getTimer() may return *smaller* values or a jump. In our projects we use /proc/uptime as a constant time source, but reading and parsing that file is a *expensive* operation, so I discourage to use it in Gnash. Unfortunately I know no other reliable time source under Linux (very strange). Udo _______________________________________________ Gnash-commit mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-commit
