[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] gnash ChangeLog server/vm/VM.h server/vm/VM.cpp...
From: |
strk |
Subject: |
Re: [Gnash-commit] gnash ChangeLog server/vm/VM.h server/vm/VM.cpp... |
Date: |
Thu, 17 May 2007 11:34:23 +0200 |
Good job! some comments below ...
On Thu, May 17, 2007 at 09:23:28AM +0000, Zou Lunkai wrote:
> + /// Time when the VM get started
> + static uint64_t _start_time;
...
> + /// Get the time when VM was started
> + static uint64_t getStartTime();
Why statics ? It's a singleton currenty, so doesn't seem important,
but we might allow restarting the VM in the future (for instance
to implement File->Open), so I'd rather see these as instance members.
> as_environment& env = thread.env;
> - env.push(floorf(VM::get().getRoot().get_timer() * 1000.0f));
> + env.push(floorf(tu_timer::get_ticks() - VM::getStartTime()));
You might push your patch further by implementing a VM::getTime() instead,
completely hiding tu_timer from outside of VM (for later possible drop).
--strk;