Get current time in BORLAND c -


i saw somewhere took computer's current in whole int,and started calculating hours minutes seconds,and don't remember function used time int, maybe inportb or mk_fp or else,and don't remember if in dos.h.can me,i tried find quite time.

in standard c, can current time calling time function:

time_t = time(null); 

which requires

#include <time.h> 

the null argument admittedly odd; it's there historical reasons.

time_t numeric type capable of representing times. way implementation-specific, it's typically integer representing number of seconds since january 1, 1970. i'm not borland uses same representation; consult system's documentation time function.

<time.h> provides various functions convert between time_t values , struct tm (a "broken-down" time), generate human-readable strings times, , forth.

there may other way current time, specific borland and/or ms-dos. unless need better 1-second resolution, or you're using implementation that's ancient doesn't suport time function properly, there's not reason use other standard time function.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -