Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 22. Timers and Time-Driven Programming > Other Time-Related Functions

22.6. Other Time-Related Functions

Although I recommend in general that you use Timers, sometimes it's more convenient and simpler to use one of the procedural time functions. These functions are included in the flash.utils package along with Timer.

22.6.1. getTimer()

The getTimer() function—which, incidentally, has nothing to do with the Timer class—returns the number of milliseconds that have elapsed since the program was initialized. getTimer() can be a useful tool when you simply need to measure the duration of an action, such as an external XML file loading, without dealing with the overhead of the Timer class.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint