hoknamahn Posted March 4, 2003 Share Posted March 4, 2003 Hi guys! I have one question: how i can get system time from HScript? I want to get start time and end time of any animation and calculate average fps of system. I thought what backward quotes must work in Houdini like in Perl but it's not working (at least in the Windows)! (see below) set start_time = `system(time /T)`; Who can answer on question: how to get system time and assign it to variable? :-( Quote Link to comment Share on other sites More sharing options...
stevenong Posted March 4, 2003 Share Posted March 4, 2003 Hey there, How about starting hscript with '-v' which will print out time stamps for each frame rendered? Cheers! steven Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted March 4, 2003 Author Share Posted March 4, 2003 What do you mean "hscript -v"? Quote Link to comment Share on other sites More sharing options...
miguel m Posted March 4, 2003 Share Posted March 4, 2003 the unix command from hscript lets you run shell commands, for example unix date would work but houdini isn't aware of whatever the date command outputs. still you can do a unix "echo %TIME% > c:/temp/start_time.txt" play the animation, blah blah then unix "echo %TIME% > c:/temp/stop_time.txt" or append with >> (the double quotes are there to prevent hscript from interpreting anything inside them, well i think variable expansion would happen) do the rest in perl and call it again using the unix command like unix perl blah.pl hum well i'm sure there are 10^6 better ways to do it Quote Link to comment Share on other sites More sharing options...
stevenong Posted March 4, 2003 Share Posted March 4, 2003 Oops! I misunderstood what you're after. Quote Link to comment Share on other sites More sharing options...
hved Posted August 22, 2020 Share Posted August 22, 2020 YYMMDD format `substr(system("cmd /C date /T"), 12, 2)``substr(system("cmd /C date /T"), 4, 2)``substr(system("cmd /C date /T"), 7, 2)` 3 Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted August 26, 2020 Share Posted August 26, 2020 On 8/22/2020 at 4:45 AM, hved said: YYMMDD format `substr(system("cmd /C date /T"), 12, 2)``substr(system("cmd /C date /T"), 4, 2)``substr(system("cmd /C date /T"), 7, 2)` Better late than never 1 1 Quote Link to comment Share on other sites More sharing options...
jytheredhood Posted March 4, 2023 Share Posted March 4, 2023 On 8/22/2020 at 12:45 PM, hved said: YYMMDD format `substr(system("cmd /C date /T"), 12, 2)``substr(system("cmd /C date /T"), 4, 2)``substr(system("cmd /C date /T"), 7, 2)` This is great!! Have been looking for this for a while now!! Is it possible to add current time in hours and minutes as well? :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.