Добавил:
korayakov
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Лабы / 2 / lab.67.by mice / tube / src / tb_classes
.h/*******************************************************************************
* file: tb_classes.h *
* version: 0.0.1 *
* author: d-evil [tmd] (mailto:d-evil.tmd@mail.ru) *
* description: not available *
*******************************************************************************/
#ifndef TB_CLASSES_INCLUDED
#define TB_CLASSES_INCLUDED
#include <time.h>
////////////////////////////////////////////////////////////////////////////////
// ctb_timeout declaration
class ctb_timeout {
public:
ctb_timeout(const clock_t to = 0, const clock_t start = 0);
~ctb_timeout();
void set(const clock_t to = 0, const clock_t start = 0);
void set_to(const clock_t to);
clock_t elapsed();
bool out();
protected:
private:
clock_t _started;
clock_t _to;
};
////////////////////////////////////////////////////////////////////////////////
// clock_t helper functions declaration
clock_t ms_to_clocks(const unsigned int t);
unsigned int clocks_to_ms(const clock_t cl);
#endif
Соседние файлы в папке src