Home / Function/ monotonicDateNow() — vite Function Reference

monotonicDateNow() — vite Function Reference

Architecture documentation for the monotonicDateNow() function in utils.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  74ee9886_2456_3964_e90e_5fc67925229d["monotonicDateNow()"]
  031bc221_67a8_c579_f2bf_bb30a08beeb2["utils.ts"]
  74ee9886_2456_3964_e90e_5fc67925229d -->|defined in| 031bc221_67a8_c579_f2bf_bb30a08beeb2
  ae322642_9768_b13d_7947_305b43316fa0["reloadModule()"]
  ae322642_9768_b13d_7947_305b43316fa0 -->|calls| 74ee9886_2456_3964_e90e_5fc67925229d
  8f73b680_d5b9_383c_f695_c906b80fb1e6["handleHMRUpdate()"]
  8f73b680_d5b9_383c_f695_c906b80fb1e6 -->|calls| 74ee9886_2456_3964_e90e_5fc67925229d
  2f681ea7_f0dd_ef5c_cb52_1396d02e37d7["handlePrunedModules()"]
  2f681ea7_f0dd_ef5c_cb52_1396d02e37d7 -->|calls| 74ee9886_2456_3964_e90e_5fc67925229d
  24ecf2a1_3c09_d451_76f3_9485b4e993f8["_createServer()"]
  24ecf2a1_3c09_d451_76f3_9485b4e993f8 -->|calls| 74ee9886_2456_3964_e90e_5fc67925229d
  f3ee260b_149d_7a3c_7489_7c6e940fce67["invalidateModule()"]
  f3ee260b_149d_7a3c_7489_7c6e940fce67 -->|calls| 74ee9886_2456_3964_e90e_5fc67925229d
  9eb17063_e0f2_709b_4eff_fdea32177425["invalidateModule()"]
  9eb17063_e0f2_709b_4eff_fdea32177425 -->|calls| 74ee9886_2456_3964_e90e_5fc67925229d
  8cb1b522_2bee_f4c7_3c23_952c0f3b82d2["invalidateAll()"]
  8cb1b522_2bee_f4c7_3c23_952c0f3b82d2 -->|calls| 74ee9886_2456_3964_e90e_5fc67925229d
  28d78764_00ba_3861_52d6_dc86fcde9e3a["transformRequest()"]
  28d78764_00ba_3861_52d6_dc86fcde9e3a -->|calls| 74ee9886_2456_3964_e90e_5fc67925229d
  style 74ee9886_2456_3964_e90e_5fc67925229d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/utils.ts lines 1756–1765

export function monotonicDateNow(): number {
  const now = Date.now()
  if (now > lastDateNow) {
    lastDateNow = now
    return lastDateNow
  }

  lastDateNow++
  return lastDateNow
}

Domain

Subdomains

Frequently Asked Questions

What does monotonicDateNow() do?
monotonicDateNow() is a function in the vite codebase, defined in packages/vite/src/node/utils.ts.
Where is monotonicDateNow() defined?
monotonicDateNow() is defined in packages/vite/src/node/utils.ts at line 1756.
What calls monotonicDateNow()?
monotonicDateNow() is called by 8 function(s): _createServer, handleHMRUpdate, handlePrunedModules, invalidateAll, invalidateModule, invalidateModule, reloadModule, transformRequest.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free