Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
3303e73d
Commit
3303e73d
authored
May 22, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Time function to get current time in ascii added
parent
952ccd39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
src/lib/co/src/co_time.c
src/lib/co/src/co_time.c
+9
-0
src/lib/co/src/co_time.h
src/lib/co/src/co_time.h
+1
-0
No files found.
src/lib/co/src/co_time.c
View file @
3303e73d
...
...
@@ -554,6 +554,15 @@ time_AtoAscii (
return
TIME__SUCCESS
;
}
//! Get current time in ascii
char
*
time_GetTimeAscii
(
time_eFormat
format
)
{
static
char
buf
[
80
];
time_AtoAscii
(
0
,
format
,
buf
,
sizeof
(
buf
));
return
buf
;
}
//! Convert ascii to timespec.
pwr_tStatus
...
...
src/lib/co/src/co_time.h
View file @
3303e73d
...
...
@@ -207,6 +207,7 @@ pwr_tDeltaTime * time_ZeroD (pwr_tDeltaTime*);
void
time_Sleep
(
float
time
);
int
time_GetTime
(
pwr_tTime
*
ts
);
int
time_GetTimeMonotonic
(
pwr_tTime
*
ts
);
char
*
time_GetTimeAscii
(
time_eFormat
format
);
int
time_PeriodPreviousMonth
(
pwr_tTime
*
time
,
pwr_tTime
*
from
,
pwr_tTime
*
to
);
int
time_PeriodPreviousWeek
(
pwr_tTime
*
time
,
pwr_tTime
*
from
,
pwr_tTime
*
to
);
void
time_PreviousDayBreak
(
pwr_tTime
*
time
,
pwr_tTime
*
daybreak
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment