hexagon logo

output program runtime

I've searched for this as I know this has been discussed once or twice. Can you output the runtime of a program? Or track it somehow just bu executing a program?

We are running CMMs (machinists, QA techs) virtually around the clock and boss want to know if we can track this for a week or so to justify getting a person to just run parts for the machinists.
Parents
  • Put this at the beginning of your program (this will only give whole seconds):

    [COLOR="White"].[/COLOR]
                ASSIGN/STARTTIME = INT(SYSTEMTIME("HH") * 3600) + INT(SYSTEMTIME("mm") * 60) + INT(SYSTEMTIME("ss"))
    [COLOR="White"].[/COLOR]
    


    Put this at the end of your program:

    [COLOR="White"].[/COLOR]
                ASSIGN/TOTALTIME = INT(SYSTEMTIME("HH") * 3600) + INT(SYSTEMTIME("mm") * 60) + INT(SYSTEMTIME("ss")) - STARTTIME
    [COLOR="White"].[/COLOR]
    


    The variable TOTALTIME is the number of seconds it took your program to execute.

    For decimal minutes:

    [COLOR="White"].[/COLOR]
                ASSIGN/TOTALTIME = (INT(SYSTEMTIME("HH") * 3600) + INT(SYSTEMTIME("mm") * 60) + INT(SYSTEMTIME("ss")) - STARTTIME) / 60
    [COLOR="White"].[/COLOR]
    
Reply
  • Put this at the beginning of your program (this will only give whole seconds):

    [COLOR="White"].[/COLOR]
                ASSIGN/STARTTIME = INT(SYSTEMTIME("HH") * 3600) + INT(SYSTEMTIME("mm") * 60) + INT(SYSTEMTIME("ss"))
    [COLOR="White"].[/COLOR]
    


    Put this at the end of your program:

    [COLOR="White"].[/COLOR]
                ASSIGN/TOTALTIME = INT(SYSTEMTIME("HH") * 3600) + INT(SYSTEMTIME("mm") * 60) + INT(SYSTEMTIME("ss")) - STARTTIME
    [COLOR="White"].[/COLOR]
    


    The variable TOTALTIME is the number of seconds it took your program to execute.

    For decimal minutes:

    [COLOR="White"].[/COLOR]
                ASSIGN/TOTALTIME = (INT(SYSTEMTIME("HH") * 3600) + INT(SYSTEMTIME("mm") * 60) + INT(SYSTEMTIME("ss")) - STARTTIME) / 60
    [COLOR="White"].[/COLOR]
    
Children
No Data