Page 1 of 1

access the CPU timer inside a Java card Applet,

Posted: Tue Jan 12, 2016 4:54 am
by Heerden
For JavaCard 3, As far as I know, it seems to be possible to access the CPU timer inside a Java card Applet, since the method System.getCurrentMillis() is available. But Is it possible for Javacard 2 either?
Are there any Javacards with proprietary extensions that allow to access a timer?

Re: access the CPU timer inside a Java card Applet,

Posted: Thu Jan 14, 2016 11:01 pm
by AmigoJack
Hi friend.
There is no timer defined for Java Card 2.

A complicated way I can think of measuring the time
1. implementing a counter loop and evaluating the byte code length of each iteration
2. knowledge about the Java Card byte code to assembler translation
3. knowledge about how long this assembler commands take
4. knowledge about the smart card IC's clock frequency

Hope this can help you!