[m-rev.] for review: add function time__clk_tck/0

Peter Ross pro at missioncriticalit.com
Fri Jan 10 22:58:36 AEDT 2003


On Wed, Jan 08, 2003 at 05:17:14PM +1100, David Overton wrote:
> +:- func time__c_clk_tck = int.
> +
> +:- pragma foreign_proc("C", time__c_clk_tck = (Ret::out),
> +		[will_not_call_mercury, promise_pure],
> +"{
> +#if defined(MR_HAVE_SYSCONF) && defined(_SC_CLK_TCK)
> +	Ret = (MR_Integer) sysconf(_SC_CLK_TCK);
> +#elif defined(CLK_TCK)
> +	/*
> +	** If sysconf is not available, try using the (obsolete) macro CLK_TCK.
> +	*/
> +	Ret = (MR_Integer) CLK_TCK;
> +#else
> +	Ret = -1;
> +#endif
> +}").
>  
You are missing a default implementation for use on the non-C backends.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list