Given a character vector 'vec', return a character(1) representing the line of code used to generate 'vec'

parse_slurm_time(tim)

Arguments

tim

A character() representing time intervals as reported in fields like Elapsed from sacct, in days-hours:mins:secs

Value

A difftime() vector of time intervals

Author

Nicholas J. Eagles

Examples


slurm_times <- c("0:00", "1:04:07", "11:03:02", "1-01:39:12", "33-14:40:54")
slurmjobs:::parse_slurm_time(slurm_times)
#> Time differences in secs
#> [1]       0    3847   39782   92352 2904054