阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js process.hrtime.bigint

      Node.js process.hrtime.bigint

      新增于: v10.7.0

      • Returns: < bigint>

      The bigint version of the process.hrtime() method returning the current high-resolution real time in a bigint.

      Unlike process.hrtime(), it does not support an additional time argument since the difference can just be computed directly by subtraction of the two bigints.

      const start = process.hrtime.bigint();
      // 191051479007711n
      
      setTimeout(() => {
        const end = process.hrtime.bigint();
        // 191052633396993n
      
        console.log(`Benchmark took ${end - start} nanoseconds`);
        // Benchmark took 1154389282 nanoseconds
      }, 1000);
      

      更多内容请参考:Node.js process 进程,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录