• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to find out the execution time of an MIDP application?

 
Manoj K.S
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a small MIDP application.I would like to find out the time taken to execute this program on Sony Palm PDA ,CLIE.
Could anyone please share your thoughts on this matter.

I have a class called GmBlock_NoFlicker that extends midlet class.This class contains the methds like startApp(),Destroy app()..
MY second cllass is GameCanvas.This class is an extends class canvasThis contains methods like paint().

I like to know how to compute the total time.
I found that System.currentTimeMillis() may be used.
But i dont know how it can be use
Any suggestions?
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When your application starts (e.g. in startApp()), store somewhere the start time using System.currentTimeMillis(). Then, when your application is ending (e.g. in destroyApp()) get the stop value of the time using System.currentTimeMillis() again. Then, subtract the stop value and the start value and you get the duration of your app.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic