Files
IoTManager/include/Utils/TimeUtils.h
Yuri Trikoz e375cca3dc Terminal
2020-06-24 01:16:00 +03:00

52 lines
908 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include <Arduino.h>
#ifdef ESP8266
#include <TZ.h>
#endif
void Time_Init();
/*
* Получение текущего времени
*/
String getTime();
/*
* Получаем время в формате linux gmt
*/
String getTimeUnix();
/*
* Параметр время
* @result результат
*/
boolean getUnixTimeStr(String&);
String getTimeWOsec();
/*
* Получение даты
*/
String getDate();
String getDateDigitalFormated();
int timeToMin(String Time);
const String prettyMillis(unsigned long time_ms = millis());
int timeZoneInSeconds(const byte timeZone);
bool hasTimeSynced();
int getBiasInSeconds();
/*
* Время (мс) прошедщее с @simce
*/
unsigned long millis_since(unsigned long sinse);
/*
* Интерввал времени (мс) между @start и @fimish
*/
unsigned long millis_passed(unsigned long start, unsigned long finish);