Sha256: d587730eefee0d518e8630a35dd5c7e9498978de6538ca7021b01c8fa5644224
Contents?: true
Size: 550 Bytes
Versions: 21
Compression:
Stored size: 550 Bytes
Contents
/* LoopTime.cpp - - Loop Timer library for Wiring/Arduino - Version 0.1 Original code by JD Banrhart Original Arduino Library by BB Riley */ // include types & constants of Wiring core API #include "WProgram.h" #include "LoopTimer.h" LoopTimer::LoopTimer() { start_loop_time = 0; total_loop_time = 0; } // track method void LoopTimer::track(void) { total_loop_time = millis() - start_loop_time; start_loop_time = millis(); } // get total loop time: unsigned long LoopTimer::get_total(void) { return total_loop_time; }
Version data entries
21 entries across 21 versions & 4 rubygems