[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: zou lunkai
Subject: Re: [Gnash-commit] gnash ChangeLog server/vm/VM.h server/vm/VM.cpp...
Date: Thu, 17 May 2007 17:43:09 +0800

On 5/17/07, strk <address@hidden> wrote:
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.

Will "loadMovie()" cause a creation for another VM?  Will there be
more than one VMs executing in the future?  That's the (possible)
reason that I use a static variable.

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

OK, that's better. I'll do that later. Thanks!

reply via email to

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