File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use super :: * ;
2+ #[ cfg( not( target_arch = "wasm32" ) ) ]
23use chrono:: { SecondsFormat , Utc } ;
34#[ cfg( not( target_arch = "wasm32" ) ) ]
45use egui_file_dialog:: DialogState ;
56use serde:: Serialize ;
67#[ cfg( not( target_arch = "wasm32" ) ) ]
78use std:: path:: PathBuf ;
9+ #[ cfg( target_arch = "wasm32" ) ]
10+ use web_sys:: js_sys:: Date ;
811
912#[ derive( Debug , Clone , Serialize ) ]
1013pub ( super ) struct FitExportRecord {
@@ -244,11 +247,17 @@ impl CurveFitApp {
244247 }
245248}
246249
250+ #[ cfg( not( target_arch = "wasm32" ) ) ]
247251fn now_utc_rfc3339_millis ( ) -> String {
248252 chrono:: DateTime :: < Utc > :: from ( std:: time:: SystemTime :: now ( ) )
249253 . to_rfc3339_opts ( SecondsFormat :: Millis , true )
250254}
251255
256+ #[ cfg( target_arch = "wasm32" ) ]
257+ fn now_utc_rfc3339_millis ( ) -> String {
258+ Date :: new_0 ( ) . to_iso_string ( ) . into ( )
259+ }
260+
252261fn metric_quantization_decimal_places ( metric_quantization : MetricQuantization ) -> Option < u8 > {
253262 match metric_quantization {
254263 MetricQuantization :: Disabled => None ,
You can’t perform that action at this time.
0 commit comments