Skip to main content

Mountain/IPC/DevLog/
SessionTimestamp.rs

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