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
b97a0574
Commit
b97a0574
authored
6 years ago
by
Florian Prill
Browse files
Options
Downloads
Patches
Plain Diff
[divide_timespans] patched divide... interface in examples.
parent
76597e8e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/example_hl.f90
+1
-1
1 addition, 1 deletion
examples/example_hl.f90
examples/tas.f90
+5
-5
5 additions, 5 deletions
examples/tas.f90
with
6 additions
and
6 deletions
examples/example_hl.f90
+
1
−
1
View file @
b97a0574
...
@@ -90,7 +90,7 @@ PROGRAM example
...
@@ -90,7 +90,7 @@ PROGRAM example
! division
! division
td1
=
t_timedelta
(
"PT23H42M"
)
td1
=
t_timedelta
(
"PT23H42M"
)
dqts
=
td1
%
divideInSecondsBy
(
td
)
dqts
=
td1
%
divideInSecondsBy
(
td
,
dt
)
WRITE
(
0
,
*
)
td1
%
toString
(),
" / "
,
td
%
toString
(),
" = "
,
dqts
%
quotient
,
" plus stuff"
WRITE
(
0
,
*
)
td1
%
toString
(),
" / "
,
td
%
toString
(),
" = "
,
dqts
%
quotient
,
" plus stuff"
! toSeconds, toMilliSeconds
! toSeconds, toMilliSeconds
...
...
This diff is collapsed.
Click to expand it.
examples/tas.f90
+
5
−
5
View file @
b97a0574
...
@@ -72,7 +72,7 @@ program tas
...
@@ -72,7 +72,7 @@ program tas
call
timedeltatostring
(
tdivisor
,
ctd
)
call
timedeltatostring
(
tdivisor
,
ctd
)
print
*
,
ctd
print
*
,
ctd
call
divideTimeDeltaInSeconds
(
tdividend
,
tdivisor
,
tq
)
CALL
divideTimeDeltaInSeconds
(
tdividend
,
tdivisor
,
dt1
,
tq
)
print
*
,
tq
print
*
,
tq
...
@@ -171,11 +171,11 @@ contains
...
@@ -171,11 +171,11 @@ contains
tddiff
=>
newtimedelta
(
'PT0S'
)
tddiff
=>
newtimedelta
(
'PT0S'
)
tddiff
=
mtime_current
-
mtime_begin
tddiff
=
mtime_current
-
mtime_begin
call
dividetimedeltainseconds
(
tddiff
,
vlsec
,
tq
)
step
=
tq
%
quotient
mtime_step
=>
newDatetime
(
"0000-01-01T00:00:00.000"
);
mtime_step
=>
newDatetime
(
"0000-01-01T00:00:00.000"
);
CALL
dividetimedeltainseconds
(
tddiff
,
vlsec
,
mtime_step
,
tq
)
step
=
tq
%
quotient
if
(
step
>=
0
)
then
if
(
step
>=
0
)
then
mtime_step
=
mtime_begin
+
step
*
vlsec
mtime_step
=
mtime_begin
+
step
*
vlsec
...
...
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