ethsec
==============================================
Purpose
----------------
Computes the difference between two times, as generated by
the :func:`date` command, in hundredths of a second.
Format
----------------
.. function:: hs = ethsec(t_start, t_end)
:param t_start: starting date, in the order:
yr, mo, day, hundredths of a second.
:type t_start: 4x1 vector
:param t_end: ending date, in the order:
yr, mo, day, hundredths of a second.
MUST be later date than *tstart*.
:type t_end: 4x1 vector
:return hs: elapsed time measured in hundredths of
a second.
:rtype hs: scalar
Examples
----------------
::
// Set start date
t_start = { 2009, 9, 14, 0 };
// Set ending date
t_end = { 2009, 9, 14, 360 };
// Calculate elapsed hundredths of secs
hs = ethsec(t_start, t_end);
After the code above, *hs* is equal to:
::
360
::
// Set start date
t_start = { 2009, 9, 14, 0 };
// Set ending date
t_end = { 2009, 9, 15, 0 };
// Calculate elapsed hundredths of secs
hs = ethsec(t_start, t_end);
After the code above, *hs* is equal to:
::
8640000
which is equal to :math:`24 \text{ hrs/day } \times 60 \text{ min/hr } \times 60 \text{ secs/min } \times 100 \text{ hsecs/sec}`.
Remarks
-------
This will work correctly across leap years and centuries. The
assumptions are a Gregorian calendar with leap years on the years evenly
divisible by 4 and not evenly divisible by 100, unless divisible by 400.
Source
------
time.src
.. seealso:: Functions :func:`dayinyr`