Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libmtime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libmtime
Commits
4e14bdc3
Commit
4e14bdc3
authored
5 years ago
by
Florian Prill
Browse files
Options
Downloads
Patches
Plain Diff
add new large integer div routine to c interfaces.
parent
c94866b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mtime_c_bindings.f90
+14
-3
14 additions, 3 deletions
src/mtime_c_bindings.f90
with
14 additions
and
3 deletions
src/mtime_c_bindings.f90
+
14
−
3
View file @
4e14bdc3
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment