Skip to content

Commit

Permalink
Adding constants for time
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanml committed May 12, 2021
1 parent cac1fa5 commit 64ae808
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/scripts/controllers/app-state.js
@@ -1,13 +1,14 @@
import EventEmitter from 'events';
import { ObservableStore } from '@metamask/obs-store';
import { METAMASK_CONTROLLER_EVENTS } from '../metamask-controller';
import * as time from '../../../shared/constants/time';

// 1 hour
const REMINDER_CHECK_INTERVAL = 1000 * 60 * 60;
const REMINDER_CHECK_INTERVAL = time.HOUR;
// 2 days
const INITIAL_REMINDER_FREQUENCY = 1000 * 60 * 60 * 24 * 2;
const INITIAL_REMINDER_FREQUENCY = time.DAY * 2;
// 90 days
const FOLLOWUP_REMINDER_FREQUENCY = 1000 * 60 * 60 * 24 * 90;
const FOLLOWUP_REMINDER_FREQUENCY = time.DAY * 90;

export default class AppStateController extends EventEmitter {
/**
Expand Down
5 changes: 5 additions & 0 deletions shared/constants/time.js
@@ -0,0 +1,5 @@
export const MILLISECOND = 1;
export const SECOND = MILLISECOND * 1000;
export const MINUTE = SECOND * 60;
export const HOUR = MINUTE * 60;
export const DAY = HOUR * 24;

0 comments on commit 64ae808

Please sign in to comment.