Skip to content
Snippets Groups Projects
Commit 4e14bdc3 authored by Florian Prill's avatar Florian Prill
Browse files

add new large integer div routine to c interfaces.

parent c94866b2
No related branches found
No related tags found
No related merge requests found
module mtime_c_bindings
MODULE mtime_c_bindings
!
use, intrinsic :: iso_c_binding, only: c_bool, c_int, c_char, c_null_char, c_ptr, c_int64_t, &
& c_float, c_double, c_associated
......@@ -84,6 +84,7 @@ module mtime_c_bindings
!
type, bind(c) :: divisionquotienttimespan
integer(c_int64_t) :: quotient;
integer(c_int64_t) :: remainder_days;
integer(c_int64_t) :: remainder_in_ms;
end type divisionquotienttimespan
!
......@@ -511,15 +512,25 @@ module mtime_c_bindings
end function my_timedeltatojuliandelta
!
FUNCTION my_divideTimeDeltaInSeconds(dividend, divisor, base_dt, quotient) &
RESULT(ret_quotient) BIND(c,name='divideTimeDeltaInSeconds')
RESULT(ret_quotient) BIND(c,name='divideTimeDeltaInSeconds')
import :: c_ptr
type(c_ptr) :: ret_quotient
type(c_ptr) :: ret_quotient
type(c_ptr), value :: dividend
type(c_ptr), value :: divisor
type(c_ptr), value :: base_dt
type(c_ptr), value :: quotient
end function my_divideTimeDeltaInSeconds
!
FUNCTION my_divideTimeDelta(dividend, divisor, base_dt, quotient) &
RESULT(ret_quotient) BIND(c,name='divideTimeDelta')
import :: c_ptr
type(c_ptr) :: ret_quotient
type(c_ptr), value :: dividend
type(c_ptr), value :: divisor
type(c_ptr), value :: base_dt
type(c_ptr), value :: quotient
END FUNCTION my_divideTimeDelta
!
FUNCTION my_divideDatetimeDifferenceInSeconds(dt1, dt2, divisor, quotient) RESULT(ret_quotient) &
& bind(c,name='divideDatetimeDifferenceInSeconds')
import :: c_ptr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment