Sorry, but I don't get what you are doing with getPauseTime(), because
the result is also relative to startTime.
To get it clear, an Alpha's startTime is the wall clock time all other
times in the alpha object are relative to (e.g. triggerTime). By default
it is the (absolute) start time of the application.
You can get the current (absolute) time with the static
System.currrentTimeMillis()
method. So you use
alpha.setStartTime(System.currrentTimeMillis());
to start an alpha object immediately, i.e. as soon as this line of code
is executed. To start it in 2 seconds you can do either
alpha.setStartTime(System.currrentTimeMillis()+2000);
or
alpha.setStartTime(System.currrentTimeMillis());
alpha.setTriggerTime(2000);
If you still need the milliseconds since the start of the app
long t=System.currentTimeMillis()-alpha.getStartTime();
does the job.
Hope this answers your question.
JK.
> Is there an easy way to get the current time (milliseconds from the
> starting)? Because i would like to set the Alpha object active "Now" but
[quoted text clipped - 6 lines]
>
> Miichael
Michael Maier - 10 Feb 2004 14:35 GMT
> Hope this answers your question.
> JK.
Yes it did, thank you very much :)
Michael