1 module des.flow.base; 2 3 import std.datetime; 4 5 /// 6 class FlowException : Exception 7 { 8 this( string msg, string file=__FILE__, size_t line=__LINE__ ) @safe pure nothrow 9 { super( msg, file, line ); } 10 } 11 12 /// Control work element commands 13 enum Command 14 { 15 START, /// 16 PAUSE, /// 17 STOP, /// 18 REINIT,/// destroy work element and create it 19 CLOSE /// destroy work element 20 }; 21 22 23 package 24 { 25 import des.ts; 26 import des.log; 27 import des.arch.emm; 28 29 @property ulong currentTick() { return Clock.currAppTick().length; } 30 31 version(unittest) 32 { 33 import std.math; 34 import std.traits; 35 import std.range; 36 37 bool creationTest(T)( T a ) 38 if( is( Unqual!T == T ) ) 39 { 40 auto cn_a = const T( a ); 41 auto im_a = immutable T( a ); 42 auto sh_a = shared T( a ); 43 auto sc_a = shared const T( a ); 44 auto si_a = shared immutable T( a ); 45 auto a_cn = T( cn_a ); 46 auto a_im = T( im_a ); 47 auto a_sh = T( sh_a ); 48 auto a_sc = T( sc_a ); 49 auto a_si = T( si_a ); 50 return a_cn == a && 51 a_im == a && 52 a_sh == a && 53 a_sc == a && 54 a_si == a; 55 } 56 } 57 }