| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.10

 

pack_time

#include "sfldate.h"
word
pack_time (long time)

Synopsis

Packs the time into a single unsigned short word. Use this function to store times when memory space is at a premium. The packed time can be used correctly in comparisons. Returns the packed time. Seconds are stored with 2-second accuracy and centiseconds are lost.

Source Code - (sfldate.c)

{
    return (word) ((GET_HOUR   (time) << 11) +
                   (GET_MINUTE (time) << 5)  +
                   (GET_SECOND (time) >> 1));
}

| << | < | > | >> iMatix Copyright © 1996-99 iMatix Corporation