Timestamp: 1610649307524

useTimestamp

Reactive current timestamp

Usage

import { useTimestamp } from '@vueuse/core'

const { timestamp, pause, resume } = useTimestamp({ offset: 0 })

Type Declarations

export interface TimestampOptions {
  /**
   * Offset value adding to the value
   *
   * @default 0
   */
  offset?: number
}
/**
 * Reactive current timestamp.
 *
 * @see   {@link /useTimestamp}
 * @param options
 */
export declare function useTimestamp(
  options?: TimestampOptions
): {
  stop: Fn
  start: Fn
  isActive: Ref<boolean>
  pause: Fn
  resume: Fn
  timestamp: Ref<number>
}

Source

SourceDemoDocs