Anonymous

Module:TimeSpan: Difference between revisions

From Melvor Idle
m
camelCase functions
m (Slight improvements to toStringLong)
m (camelCase functions)
Line 40: Line 40:
end
end


function TimeSpan.FromMilliseconds(milliseconds)
function TimeSpan.fromMilliseconds(milliseconds)
     return TimeSpan.new(0, 0, 0, 0, (milliseconds or 0))
     return TimeSpan.new(0, 0, 0, 0, (milliseconds or 0))
end
end


function TimeSpan.FromSeconds(seconds)
function TimeSpan.fromSeconds(seconds)
     local totalMilliseconds = (seconds or 0) * MillisecondsPerSecond
     local totalMilliseconds = (seconds or 0) * MillisecondsPerSecond
     return TimeSpan.new(0, 0, 0, 0, totalMilliseconds)
     return TimeSpan.new(0, 0, 0, 0, totalMilliseconds)
2,875

edits