Generic Commit; Most likely a fix or small feature
This commit is contained in:
@@ -31,10 +31,15 @@ export class TimeSpan {
|
||||
}
|
||||
}
|
||||
|
||||
export interface TimeBetween {
|
||||
seconds: number;
|
||||
toReadable: (roundToMinutes?: boolean) => string;
|
||||
}
|
||||
|
||||
export function calculateSecondsBetween(
|
||||
start: number,
|
||||
end: number,
|
||||
): { seconds: number; toReadable: (roundToMinutes?: boolean) => string } {
|
||||
): TimeBetween {
|
||||
const seconds = Math.max(60, (end - start) / 1000);
|
||||
return {
|
||||
seconds,
|
||||
|
||||
Reference in New Issue
Block a user