Garry's Mod Wiki

math.TimeFraction

  number math.TimeFraction( number start, number end, number current )

Description

Returns the fraction of where the current time is relative to the start and end times

Arguments

1 number start
Start time in seconds
2 number end
End time in seconds
3 number current
Current time in seconds

Returns

1 number
Fraction

Example

Prints the time fraction of 5 between 0 and 10

Output: 0.5