ATOINC(3)




TIME atoinc(char *increment)


DESCRIP-


TION


Atoinc


con-


verts


a


string


represen-


ta-


tion


of


a


time


incre-


ment


into


a


TIME


(alias


dou-


ble).


TIMEs


are


in


seconds.


the


gen-


eral


form


of


a


time


incre-


ment


is:


{number}{_}{multiplier}{suffix}


where


any


part


may


be


omit-


ted.



Recog-


nized


mul-


ti-


pliers


are:

        "deca",

1e1,

        "deci",

1e-


1,

        "centi",

1e-


2,

        "milli",

1e-


3,

        "micro",

1e-


6,

        "mu",

1e-


6,

        "nano",

1e-


9,

        "pico",

1e-


12,

        "femto",

1e-


15,

        "atto",

1e-


18,



Recog-


nized


suf-


fixes


are:

        "hz",

8,

        "hertz",

8,

        "rot",

7,

        "rots",

7,

        "rota-

tion",


7,

        "rota-

tions",


7,

        "deg",

6,

        "degs",


5,

        "d",

4,

        "day",

4,

        "days",

4,

        "h",

3,

        "hr",

3,

        "hrs",

3,

        "hour",

3,

        "hours",

3,

        "m",

2,

        "min",

2,

        "mins",

2,

        "minute",

2,

        "minutes",

2,

        "secs",

1,

        "seconds",

1,

        "s",

1,


where


the


number


denotes


the


interpre-


ta-


tion


in


seconds


from


the


set:


case


1:


/*


seconds


*/

        return(mult*num);


/*


days


*/

        return(mult*num*86400);

case


5:


/*


weeks


*/

        return(num*604800);

case


6:


/*


car-


ring-


ton


degrees


*/

        return(num);

case


7:


/*


car-


ring-


ton


rota-


tions


*/

        return(num*360);

case


8:


/*


hertz


*/

        return(mult*num);

FILES


SEE


ALSO


DIAG-


NOS-


TICS


BUGS