File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ IDL = $(OMDEV)\bin\mico\idl
2020OBJ = rtopts.obj socketimpl.obj printimpl.obj systemimpl.obj systemimplmisc.obj dynload.obj settingsimpl.obj \
2121ptolemyio.obj daeext.obj ErrorMessage.obj errorext.obj optmanager.obj \
2222omc_communication.obj omc_communication_impl.obj corbaimpl.obj \
23- unitparser.obj unitparserext.obj SimulationResults.obj IOStreamExt.obj
23+ unitparser.obj unitparserext.obj SimulationResults.obj IOStreamExt.obj rtclock.obj
2424
2525all: $(OBJ) runtimevc.lib
2626
Original file line number Diff line number Diff line change @@ -48,9 +48,10 @@ void rt_tick(int ix) {
4848
4949double rt_tock (int ix ) {
5050 LARGE_INTEGER tock_tp ;
51+ double d1 ,d2 ;
5152 QueryPerformanceCounter (& tock_tp );
52- double d1 = (double )(tock_tp .QuadPart - tick_tp [ix ].QuadPart );
53- double d2 = (double ) performance_frequency .QuadPart ;
53+ d1 = (double )(tock_tp .QuadPart - tick_tp [ix ].QuadPart );
54+ d2 = (double ) performance_frequency .QuadPart ;
5455 return d1 / d2 ;
5556}
5657
@@ -68,7 +69,7 @@ void rt_tick(int ix) {
6869double rt_tock (int ix ) {
6970 uint64_t tock_tp = mach_absolute_time ();
7071 uint64_t nsec ;
71- static mach_timebase_info_data_t info = {0 ,0 };
72+ static mach_timebase_info_data_t info = {0 ,0 };
7273 if (info .denom == 0 )
7374 mach_timebase_info (& info );
7475 uint64_t elapsednano = (tock_tp - tick_tp [ix ]) * (info .numer / info .denom );
You can’t perform that action at this time.
0 commit comments