The example on the CINTERFACE page no longer works since the return type of _ml_Time_timeofday has been changed from (Int32.int * int) to Word64.word. The current example code for c_function is:
val gettimeofday : unit -> (Int32.int * int) =
c_function "SMLNJ-Time" "timeofday"
This should be:
val gettimeofday : unit -> Word64.word =
c_function "SMLNJ-Time" "timeofday"
It seems that the return type was changed in June of 2019. Here is a Q&A on StackOverflow where this issue came up recently.
The example on the CINTERFACE page no longer works since the return type of
_ml_Time_timeofdayhas been changed from(Int32.int * int)toWord64.word. The current example code forc_functionis:This should be:
It seems that the return type was changed in June of 2019. Here is a Q&A on StackOverflow where this issue came up recently.