Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

SyncTime Simulink function

Cross platform, for simulation and embedding

Produces epoch based timestamp and syncs the model to a given period

Usage

Specify dt as the period: if dt=0 just measure time otherwise sleeps a variable time to align with the dt

Internals

  • Linux: clock_gettime(CLOCK_REALTIME, &spec);
  • OSX: gettimeofday(&TV, NULL);
  • Windows: GetSystemTimeAsFileTime base + GetTickCount or QueryPerformanceCounter

TODO

Make Windows use GetSystemTimeAsFileTime always if needed

About

Simulink Time Synchronization for Simulation and RTW

Resources

Releases

No releases published

Packages

No packages published