Commit graph

13 commits

Author SHA1 Message Date
Ian Abbott
a4dd004076 demo/insn: report start and end time as unsigned values
Report the seconds and microseconds values from the INSN_GTOD
instructions as unsigned values to postpone the Y2038 problem to a Y2106
problem.  Be a bit more careful with the conversion to a signed
difference.  We wouldn't normally expect time to go backwards, but it is
possible if the system time is set to to an older time between the
instructions.

Also, in the description of INSN_GTOD in the Comedilib manual,
explicitly mention that the seconds and microseconds values are
unsigned.
2016-06-20 11:09:55 +01:00
Ian Abbott
605fd55655 Fix use of INSN_GTOD so it works on 64-bit platforms.
A struct timeval is not the same size as a pair of lsampl_t's for 64-bit,
so can't point 'data' in a comedi_insn to a struct timeval and expect it
to work!
2007-11-07 13:01:50 +00:00
Frank Mori Hess
fbdf65b4f5 Made parse_options() write options to a struct instead of passing
them through global variables.
2007-01-03 21:14:53 +00:00
Frank Mori Hess
26769e5635 set default n_scan value to 10 for insn demo, added check that it is
not set larger than MAX_SAMPLES
2003-03-05 17:01:34 +00:00
Frank Mori Hess
ea64ba8daa fixing includes for exit(), memset() for gcc 2.96 compiler warnings 2003-01-01 23:07:02 +00:00
David Schleef
d59513479b Use n_scans as the number of samples to measure. 2002-05-11 06:43:30 +00:00
Frank Mori Hess
58b905a8c3 made insn demo take 10 samples again as it originally did 2001-07-25 15:53:57 +00:00
David Schleef
31b3e7ed7f Changed the name of verbose_flag; Added a few more flags in main.c 2001-07-14 00:50:52 +00:00
David Schleef
01a017f515 5 new demos
cmd uses main.c
removal of direct ioctl calls
2001-03-01 21:57:00 +00:00
David Schleef
79a511162d Cleanup of example programs 2000-10-19 06:28:27 +00:00
David Schleef
e7a0f5f10c changes 2000-09-05 18:10:55 +00:00
David Schleef
5c8326c791 documentation additions and updates 2000-09-03 02:16:55 +00:00
David Schleef
f9c356a840 insn demo 2000-08-09 21:11:29 +00:00