View source: R/generic_support.r
timeval | R Documentation |
Some Amiga applications use a timeval struct (see references) to represent a time span in seconds. This function coerces raw data to such a numeric time span.
timeval(x)
x |
a |
Timeval is a structure (struct) as specified in device/timer.h on the Amiga (see
references). It represents a timespan in seconds. This function retrieves the
numeric value from raw
data. Amongst others, the timeval struct was used
in the system-configuration file (see SysConfig) to specify key repeat speed,
key repeat delay and mouse double click speed. Use as.raw
for the inverse
of this function and get the original raw data.
Returns a numeric
vector
of a timespan in seconds. It is
represented as an S3 AmigaTimeVal class.
Pepijn de Vries
http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node0053.html
## First four raw values represent seconds, the latter four microseconds:
temp <- timeval(as.raw(c(0, 0, 0, 1, 0, 0, 0, 1)))
print(temp)
## You can use 'as.raw' to get the original raw data again:
as.raw(temp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.