Skip to main content

Mountain/IPC/DevLog/
SessionTimestamp.rs

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