DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/DevLog/SessionTimestamp.rs
1//! Local-time session timestamp (`%Y%m%dT%H%M%S`) cached once
2//! per process. Must agree with
3//! `WindServiceHandlers::nativeHost:getEnvironmentPaths` so the
4//! Mountain dev log and VS Code's `window<N>/output_*` log
5//! land in the same session directory.
6
7use std::sync::OnceLock;
8
9pub fn Fn() -> String {
10 static STAMP:OnceLock<String> = OnceLock::new();
11
12 STAMP
13 .get_or_init(|| chrono::Local::now().format("%Y%m%dT%H%M%S").to_string())
14 .clone()
15}