[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] getloadavg in chicken?
From: |
Sven . Hartrumpf |
Subject: |
Re: [Chicken-users] getloadavg in chicken? |
Date: |
Thu, 08 Jul 2004 10:10:15 +0200 (CEST) |
On 07 Jul 2004, felix <address@hidden> wrote:
> Putting this into the core system would only make sense when
> the same functionality can be provided for Win32.
Agreed.
> So I recommend writing a wrapper instead.
I am not familiar with the C interface, so the following code contains
a bug (because conversion from C double to Scheme flonum is missing in
get-load-average? How?)
#>
static double C_get_load_average(__scheme_value i)
{
double avg;
getloadavg(&avg, 1);
return avg;
}
<#
(define (get-load-average value)
(let ((avg (##core#inline "C_get_load_average" value)))
;(write avg)(newline)
avg))
pgproUSLZfwS4.pgp
Description: PGP signature