Add durations
utility for computing durations
This commit is contained in:
parent
c6aa668a9b
commit
f86f753df9
28 changed files with 99 additions and 95 deletions
|
@ -1,18 +1,14 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as durations from '../../util/durations';
|
||||
|
||||
export type TestExpireTimer = Readonly<{ value: number; label: string }>;
|
||||
|
||||
const SECOND = 1;
|
||||
const MINUTE = 60 * SECOND;
|
||||
const HOUR = 60 * MINUTE;
|
||||
const DAY = 24 * HOUR;
|
||||
const WEEK = 7 * DAY;
|
||||
|
||||
export const EXPIRE_TIMERS: ReadonlyArray<TestExpireTimer> = [
|
||||
{ value: 42 * SECOND, label: '42 seconds' },
|
||||
{ value: 5 * MINUTE, label: '5 minutes' },
|
||||
{ value: 1 * HOUR, label: '1 hour' },
|
||||
{ value: 6 * DAY, label: '6 days' },
|
||||
{ value: 3 * WEEK, label: '3 weeks' },
|
||||
{ value: 42 * durations.SECOND, label: '42 seconds' },
|
||||
{ value: 5 * durations.MINUTE, label: '5 minutes' },
|
||||
{ value: 1 * durations.HOUR, label: '1 hour' },
|
||||
{ value: 6 * durations.DAY, label: '6 days' },
|
||||
{ value: 3 * durations.WEEK, label: '3 weeks' },
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue