bugGnash - The GNU Flash player - Bugs: bug #17985, getTimer wrong

 
 

bug #17985: getTimer wrong

Submitted by:  Udo Giacomozzi <udog>
Submitted on:  Thu 12 Oct 2006 05:40:48 PM UTC  
 
Category: ActionScriptSeverity: 3 - Normal
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 04 Jul 2007 03:02:25 AM UTC, comment #6:

ActionGetTimer works now, and we have a little testcase(getTimer_test.c) for this.

(1)VM::getTime() returns the number of milliseconds since VM was started.
(2)tu_timer::get_profile_ticks() returns the system time with a micorsecond unit.

This two functions works on both win32 and unix systems, and have simpler interfaces, should be enough for general cases. Try to avoid using "gettimeofday" directly for portability. The only place we need "gettimeofday" I can see is for the Date object, and we can provide a compatible win32 "gettimeofday" later.

Zou Lunkai <zoulunkai>
Mon 02 Jul 2007 03:29:39 AM UTC, comment #5:

the problem I was tracking is now fixed.
Does the the original bug still exist ?
Note that timer implementation was changed recently, by zou.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 02 Jul 2007 12:53:51 AM UTC, comment #4:

Ehm... speaking of which. It seems something is really wrong with
timers. I'm experiencing problems with intervals in particular.
I'm tracking this.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 12 Oct 2006 07:16:53 PM UTC, comment #3:

In looking at the code for tu_timer.cpp, for Unix systems it does use gettimeofday() in the base class. It does need to be wrapped in a mutex so it's thread safe. For win32, Thatcher had implemented something using win32 timers, which turns out to be in ticks.

Rob Savoye <rsavoye>
Project Administrator
Thu 12 Oct 2006 07:11:56 PM UTC, comment #2:

Didn't know that gettimeofday() is not thread safe (still can't believe it). Anyway, we just need some cross-platform method for a timer with millisecond precision at best. The precision of gettimeofday() is normally enough.

getTimer() returns the time, in milliseconds, since the start of the movie, see http://www.sephiroth.it/reference.php?id=225&cat=1

Udo Giacomozzi <udog>
Project Member
Thu 12 Oct 2006 05:55:42 PM UTC, comment #1:

We could use getimeofday(), but we'd have to wrap it in a Boost mutex as it's not thread-safe otherwise. I believe at the time I wrote that code that the value was supposed to be in ticks, and not real time. Looking at http://sephiroth.it/reference.php?id=528&cat=1, I'm not so sure.

Rob Savoye <rsavoye>
Project Administrator
Thu 12 Oct 2006 05:40:48 PM UTC, original submission:

Two problems with getTimer():

- it returns the timer multiplied by 10 (1 second is 10000, but should be 1000)

- it is calculated on the ideal delay between frames, but Flash returns the real time passed since start of the movie

Can't we just use gettimeofday() for this?

Udo Giacomozzi <udog>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by zoulunkai (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 05 Jul 2007 06:35:38 PM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Mon 02 Jul 2007 03:29:39 AM UTCstrkStatusNone=>Ready For Test
      Carbon-Copy-=>Added zoulunkai
    Mon 02 Jul 2007 12:53:51 AM UTCstrkAssigned toNone=>strk

    Back to the top


    Powered by Savane 3.1-cleanup1