Theres probably some other better way to do it... Obviously but for now I see it as putting current time in X.
start while
take in time constantly until I is 5
constantly asking is time>X(preset time 5 seconds ahead)
if it is
display message and add one to I
Why doesnt this display my message after 5 seconds?
a) nobody said that time_t contains seconds.
b) nobody said program will not skip some time point where if(X+5==timer) (Do not use === when dealing with time)