Packages

Simulates (NOT EMULATES) Farmbot's arduino firmware and hardware. The firmware is pretty stable and used in FarmbotOS's testing environment. The visual hardware simulator is very much a WIP.

Current section

Files

Jump to
farmbot_simulator src debugTimer.h
Raw

src/debugTimer.h

#ifndef DEBUGTIMER_H_INCLUDED
#define DEBUGTIMER_H_INCLUDED
#include <SDL2/SDL.h>
#include <iostream>
class DebugTimer
{
public:
void Start()
{
startTime = SDL_GetTicks();
}
void End(const std::string& message)
{
unsigned int endTime = SDL_GetTicks();
std::cout << message << (endTime - startTime) << "ms" << std::endl;
}
protected:
private:
unsigned int startTime;
};
#endif // DEBUGTIMER_H_INCLUDED