Options
All
  • Public
  • Public/Protected
  • All
Menu

Module time/timestamp

Index

Enumerations

Functions

Functions

getTimeStamp

0.0.37 provide
  • 获取时间戳

    example

    获取13位时间戳

    import { time } from 'onex-utils;
    
    const { getTimeStamp, TimeStampType } = time;
    console.log(getTimeStamp(TimeStampType.second)); // 获取精确到秒的 10位时间戳
    console.log(getTimeStamp(TimeStampType.millisecond)); // 获取精确到毫秒的 13位时间戳
    

    Parameters

    Returns number