gcode-interpreter

A gcode interpreter I use to control lasers.
git clone git://git.christianermann.dev/gcode-interpreter
Log | Files | Refs | README | LICENSE

timing.h (429B)


      1 #ifndef TIMING_H
      2 #define TIMING_H
      3 
      4 #include <stdbool.h>
      5 
      6 typedef struct {
      7     long time_s;
      8     long time_ns;
      9 } Time;
     10 
     11 Time time_make(long time_s, long time_ns);
     12 Time time_zero();
     13 Time time_get();
     14 
     15 Time time_add(const Time* t0, const Time* t1);
     16 Time time_sub(const Time* t0, const Time* t1);
     17 float time_div(const Time* t0, const Time* t1);
     18 
     19 int time_cmp(const Time* t0, const Time* t1);
     20 bool time_eql_zero(const Time* t);
     21 
     22 #endif