Hey all i worked it out.  Someone emailed me the C code, I converted it to
PHP here it is if any one else wants it.

<?PHP
$the_time = time();

$seta = ($the_time %86400);
$setb = ($seta +3600);
$setc = ($the_time -$setb);
$setd = ($the_time -$setc);

$sety = ($setd *10);
$setz = ($sety /864);

$beat = $setz;

while($beat<0){
$beat += 1000;
}
$beat = $beat %1000;

echo "@$beat";
?>

and the C code:

beat =  (((((long)the_time)-(((long)the_time) -
                   ((((long)the_time) % 86400) + 3600))) * 10) / 864);
    while (beat < 0) {
        beat += 1000;
    }
    beat = beat % 1000;
    sprintf(tmp_buff, "%03d", beat); /* SAFE */
    strcat(return_value->value.str.val, tmp_buff);
    break;

the_time being the UNIX timestamp.

Cheers All =)



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to