man ctime
Пример TSR-программы - "часы" http://bookz.ru/authors/stivens-al/tcpt/1-tcpt.html http://txto.ru/tehnika-programmirovanija-na-turbo-si_4.html Техника программирования на Турбо Си, Стивенс Ал.
man ctime