In article <3a828a5a@newsgroups.ni.com>, MK Tan
writes
>
>Hi all,
>Does anybody know how to use the
>gettime() function in CVI. This function is define in the dos.h header found
>in Borland Turbo C compiler.
>
>It seams that I can't simply just call
>gettime(), because CVI does not have
>dos.h, but I can't simply include
>dos.h in my project file as well.
>
>Thankz in advance.
>
>Regards,
>MK. Tan
>
I don't have a copy of K&R to hand, but so far as I can remember
gettime() is a BorlandC rather than ANSI C function. I.E. the problem is
not that you don't have the header but rather there is no CVI library
function gettime().
The ANSI C function time() will give you the number of seconds elapsed
since midnight January 1st 1900 (known as calendar
time) and there are
several ANSI C functions to convert calendar time into strings and
populate structures.
Alternatively you can use the CVI function GetSystemTime() to fill
integers with the day, month and year.
N.B. GetSystemDate() is also very useful.
Hope that helps.
--
John Cameron.
Senior Design Engineer
Northern Hi-Tec Ltd
(At Home)