src/nodejs/jsperfhooks

Example:

import src/nodejs/jsperfhooks
requirePerfhooks()
mark()
clearMarks()
echo jsnow()

Procs

func clearMarks() {.importjs: "perf_hooks.performance.$1()", ...raises: [],
                    tags: [].}
https://nodejs.org/api/perf_hooks.html#perf_hooks_performance_clearmarks_name
func clearMarks(name: cstring) {.importjs: "perf_hooks.performance.$1(#)",
                                 ...raises: [], tags: [].}
https://nodejs.org/api/perf_hooks.html#perf_hooks_performance_clearmarks_name
func importPerfhooks() {.importjs: "import * as perf_hooks from \'perf_hooks\'@",
                         ...raises: [], tags: [].}
Alias for import * as module_name from 'module_name';. Must be called once before using the module
func jsnow(): cint {.importjs: "perf_hooks.performance.now()", ...raises: [],
                     tags: [].}
https://nodejs.org/api/perf_hooks.html#perf_hooks_performance_now
func mark() {.importjs: "perf_hooks.performance.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/perf_hooks.html#perf_hooks_performance_mark_name
func mark(name: cstring) {.importjs: "perf_hooks.performance.$1(#)", ...raises: [],
                           tags: [].}
https://nodejs.org/api/perf_hooks.html#perf_hooks_performance_mark_name
func measure(name, startMark, endMark: cstring) {.
    importjs: "perf_hooks.performance.$1(#, #, #)", ...raises: [], tags: [].}
https://nodejs.org/api/perf_hooks.html#perf_hooks_performance_measure_name_startmark_endmark
func measure(name: cstring) {.importjs: "perf_hooks.performance.$1(#)",
                              ...raises: [], tags: [].}
https://nodejs.org/api/perf_hooks.html#perf_hooks_performance_measure_name_startmark_endmark
func requirePerfhooks() {.importjs: "const perf_hooks = require(\'perf_hooks\')@",
                          ...raises: [], tags: [].}
Alias for const module_name = require('module_name');. Must be called once before using the module