flux.job.timeleft module

flux.job.timeleft.timeleft(flux_handle=None)

Return the remaining time in floating point seconds for the current job or enclosing instance.

If the calling process is not associated with a job, then an exception will be raised. If the job associated with the current process has no timelimit, then float(inf) is returned.

If a Flux handle is not provided, then this function will open a handle to the enclosing instance.