Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6685903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:06:39+00:00 2026-05-26T05:06:39+00:00

How is the running time of the virtual machine calculated vs. how system time

  • 0

How is the running time of the virtual machine calculated vs. how system time is calculated? I know I can get the current running time of the AVM by calling:

getTimer();

And I can get the current unix system time by doing:

new Date().getTime();

I know that the Timer class and Event.ENTER_FRAME event each come with their ups and downs, but I figured the 2 values I was comparing should stay consistently relative to each other. Here’s how I’m testing it:

private var _appRunTime:int;
private var _appStartTime:int;
private var _systemTime:int;
private var _systemCurrentTime:int;

//called at application launch
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
    _systemTime = new Date().getTime();
    _appStartTime = getTimer();
}

//called on button click to see values
protected function button1_clickHandler(event:MouseEvent):void
{
    _systemCurrentTime = new Date().getTime();
    _appRunTime = getTimer();

    trace(_systemCurrentTime - _systemTime, _appRunTime - _appStartTime);
}

I don’t understand why those numbers would slowly get out of sync. Using that code, I’ve found, at least on my computer, that the values grow apart from each other by about 3 milliseconds per minute, with the value coming from system time being the higher value and the value coming from AVM time being the lower.

Can anyone offer me an explanation what those are calculated on and why there would be that small, yet growing gap in their values as time passes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:06:40+00:00Added an answer on May 26, 2026 at 5:06 am

    On my system the same code gives no difference between getTimer() and getTime()
    after ~10 mins the difference is always between 0 and 1 ms.

    Maybe it’s an issue of you system or the specific to the player you’re running?

    I’m running flash player 11 on Win 7 x64.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I run rake db:seed ,something are broken! I get the following error: ray@ray-virtual-machine:~/ticketee$
We're going to be serving our portal software on a virtual machine running Centos
Last time I tried setting up name based virtual hosting on my development machine
How would you describe the running time of this sort, given a function sorted
I am writting a Python script and I am running out of time. I
I have a silverlight application which users will be running in various time zones
Alright, quick question. A server is running in Eastern Time. PHP program needs to
I have a real-time embedded app with the major cycle running at 10KHz. It
I have been running Visual Studio 2008 Team Edition for some time now and
I'm running Oracle 10g and have columns with Type_Name TIMESTAMP(6) WITH TIME ZONE When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.