int Posixino::millis() { unsigned long long now = millisSinceEpoch(); int result = (int)(now - startMillis); return result; } // millis()
void Posixino::init() { isDigitalOutsUsed = false; isDigitalOutsDisplayed = false; for (int n = 0; n < NO_OF_DIGI_OUTS; n++) { pinModeList[n] = -1; pinValueList[n] = -1; } startMillis = millisSinceEpoch(); key = -1; tcgetattr(fileno(stdin),&orig_term_attr); memcpy(&new_term_attr,&orig_term_attr,sizeof(struct termios)); new_term_attr.c_lflag &= ~(ECHO|ICANON); new_term_attr.c_cc[VTIME] = 0; new_term_attr.c_cc[VMIN] = 0; tcsetattr(fileno(stdin),TCSANOW,&new_term_attr); } // init()
uint64_t Util::millisSinceStart(){ return millisSinceEpoch() - nRFTP::nRFTransportProtocol::startTime; }