44mod data;
55
66use self :: data:: Data ;
7- use self :: data:: epochrealtime:: EpochRealtime ;
8- use self :: data:: epochseconds:: EpochSeconds ;
7+ use self :: data:: epochtime:: EpochTime ;
98use self :: data:: random:: RandomVar ;
109use self :: data:: seconds:: Seconds ;
1110use self :: data:: srandom:: SRandomVar ;
1211use self :: data:: single:: SingleData ;
1312use crate :: error:: exec:: ExecError ;
1413use crate :: elements:: command:: function_def:: FunctionDefinition ;
14+ use crate :: utils:: clock;
1515use std:: collections:: { HashMap , HashSet } ;
1616use std:: env;
1717
@@ -33,8 +33,10 @@ impl DataBase {
3333 ans. params [ 0 ] . insert ( "RANDOM" . to_string ( ) , Box :: new ( RandomVar :: new ( ) ) ) ;
3434 ans. params [ 0 ] . insert ( "SRANDOM" . to_string ( ) , Box :: new ( SRandomVar :: new ( ) ) ) ;
3535 ans. params [ 0 ] . insert ( "SECONDS" . to_string ( ) , Box :: new ( Seconds :: new ( ) ) ) ;
36- ans. params [ 0 ] . insert ( "EPOCHREALTIME" . to_string ( ) , Box :: new ( EpochRealtime :: default ( ) ) ) ;
37- ans. params [ 0 ] . insert ( "EPOCHSECONDS" . to_string ( ) , Box :: new ( EpochSeconds :: default ( ) ) ) ;
36+ ans. params [ 0 ] . insert ( "EPOCHSECONDS" . to_string ( ) ,
37+ Box :: new ( EpochTime :: new ( clock:: get_epochseconds) ) ) ;
38+ ans. params [ 0 ] . insert ( "EPOCHREALTIME" . to_string ( ) ,
39+ Box :: new ( EpochTime :: new ( clock:: get_epochrealtime) ) ) ;
3840 ans
3941 }
4042
0 commit comments