Today I came across a strange error. I was using datetime to print the code execution nicely (in minutes and seoonds).
→ finish
finish =
1x1 datetime
2024-06-30 21:04:53
→ start
start =
1x1 datetime
2024-06-30 21:01:47
→ duration=finish-start
at line 2 of function %duration_e ( C:\Program Files\scilab-2024.0.0\modules\time\macros%duration_e.sci line 13 )
at line 7 of function %datetime_s_datetime ( C:\Program Files\scilab-2024.0.0\modules\time\macros%datetime_s_datetime.sci line 18 )
Invalid index.
I wonder why I could not calculate the duration.
Anyway, for now I revert to using tic-toc.
finish = toc();
duration = round(finish/6)/10;
disp(duration);
So I get the execution time in minutes, with one decimal instead of seconds.
With kind regards,
Claus