Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc
Commits
e8f2c688
Commit
e8f2c688
authored
Feb 18, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secstotimestr: use div()
parent
6e43f483
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
src/misc/mtime.c
src/misc/mtime.c
+10
-14
No files found.
src/misc/mtime.c
View file @
e8f2c688
...
...
@@ -127,23 +127,19 @@ char *mstrtime( char *psz_buffer, mtime_t date )
*/
char
*
secstotimestr
(
char
*
psz_buffer
,
int
i_seconds
)
{
int
i_hours
,
i_mins
;
i_mins
=
i_seconds
/
60
;
i_hours
=
i_mins
/
60
;
if
(
i_hours
)
{
div_t
d
;
d
=
div
(
i_seconds
,
60
);
i_seconds
=
d
.
rem
;
d
=
div
(
d
.
quot
,
60
);
if
(
d
.
quot
)
snprintf
(
psz_buffer
,
MSTRTIME_MAX_SIZE
,
"%d:%2.2d:%2.2d"
,
(
int
)
i_hours
,
(
int
)
(
i_mins
%
60
),
(
int
)
(
i_seconds
%
60
)
);
}
d
.
quot
,
d
.
rem
,
i_seconds
);
else
{
snprintf
(
psz_buffer
,
MSTRTIME_MAX_SIZE
,
"%2.2d:%2.2d"
,
(
int
)
i_mins
,
(
int
)
(
i_seconds
%
60
)
);
}
return
(
psz_buffer
);
d
.
quot
,
i_seconds
);
return
psz_buffer
;
}
#if defined (HAVE_CLOCK_NANOSLEEP)
...
...
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