View Full Version : Time Stamp function for guaging speed of script...

05 May 2006, 07:38 PM
Hi Gang,

Is there a way to get the current system time in MEL? For instance in Javascript you have a Date object that can get the time in milliseconds.

var testTime = new Date();

var testTimeMilli = testTime.getTime();

//testTimeMilli equals a value in milliseconds based on system clock.

Anything like this I could get my grubby paws on in MEL?

Thanks in advance,


05 May 2006, 07:44 PM
Found it.

Looks like timerX is my best friend for now. The F1 key is amazing. Thanks!!!


05 May 2006, 07:48 PM
global proc int sm_returnTime ()
string $timeOutput = `system("time")`;
string $buffer1[];
$numTokens = `tokenize $timeOutput ":" $buffer1`;
string $hour = $buffer1[1];
string $min = $buffer1[2];
//tokenize once more
string $buffer2[];
$numTokens = `tokenize $buffer1[3] "." $buffer2`;
string $sec = $buffer2[0];

print ("Hour = " + $hour + "\n");
print ("Min = " + $min + "\n");
print ("Sec = " + $sec + "\n");

string $HourMin = ($hour + $min);
return $HourMin;

CGTalk Moderation
05 May 2006, 07:48 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.