[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [Gnash-commit] gnash ChangeLog gui/NullGui.cpp

From: Udo Giacomozzi
Subject: Re[2]: [Gnash-commit] gnash ChangeLog gui/NullGui.cpp
Date: Wed, 4 Jul 2007 09:38:01 +0200

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).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]