How can i take my system time in milliseconds in matlab

  • Follow


Hi

I have a program and want to create a time stem for it. Every time it gives an output i want to take my system time in that stem in milliseconds.
0
Reply Sukumar 2/10/2011 7:05:04 AM

On 10/02/11 1:05 AM, Sukumar Palo wrote:

> I have a program and want to create a time stem for it. Every time it
> gives an output i want to take my system time in that stem in milliseconds.

Please clarify what you mean by your "system time".

If you mean "cpu time", then

tic;
   %your code here
ms = round(toc * 1000);


If you mean "elapsed time", then

t0 = clock;
   %your code here
ms = round(etime(clock,t0) * 1000);


However, if this needs to be done automatically, whenever something is 
displayed, without you having to change the code (that you might not 
have written), then you are probably going to have to override the 
system routine named "display", which probably isn't a wonderful idea.
0
Reply Think 2/10/2011 7:16:33 AM


1 Replies
1709 Views

(page loaded in 0.046 seconds)

Similiar Articles:













7/19/2012 3:04:03 PM


Reply: