Simple question regarding TTime

I am trying to use TTime as a way to get the time in milliseconds. this seems staight foward but i keep getting 0 with the following code.

TTime *now;
now = new TTime();

ofstream outfile;
outfile<AsString();

is there something simple that i am missing about this?

[quote]I am trying to use TTime as a way to get the time in milliseconds. this seems staight foward but i keep getting 0 with the following code.

TTime *now;
now = new TTime();

ofstream outfile;
outfile<AsString();

is there something simple that i am missing about this?[/quote]

What about

TTime time(gSystem->Now()); ??

TTime::TTime() default constructor simply initializes member fMilliSec to zero.

Hi,
I think you should use TDatime instead of TTime, see below:

TDatime *now = new TDatime(); now->Get();

Cheers,
Zhiyi.