Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
253fe31c
Commit
253fe31c
authored
Oct 26, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show h: in h:mm:ss when h is 0 in secstotimestr.
parent
3b6a320b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
src/misc/mtime.c
src/misc/mtime.c
+16
-4
No files found.
src/misc/mtime.c
View file @
253fe31c
...
...
@@ -115,10 +115,22 @@ char *mstrtime( char *psz_buffer, mtime_t date )
*/
char
*
secstotimestr
(
char
*
psz_buffer
,
int
i_seconds
)
{
snprintf
(
psz_buffer
,
MSTRTIME_MAX_SIZE
,
"%d:%2.2d:%2.2d"
,
(
int
)
(
i_seconds
/
(
60
*
60
)),
(
int
)
((
i_seconds
/
60
)
%
60
),
(
int
)
(
i_seconds
%
60
)
);
int
i_hours
,
i_mins
;
i_mins
=
i_seconds
/
60
;
i_hours
=
i_mins
/
60
;
if
(
i_hours
)
{
snprintf
(
psz_buffer
,
MSTRTIME_MAX_SIZE
,
"%d:%2.2d:%2.2d"
,
(
int
)
i_hours
,
(
int
)
(
i_mins
%
60
),
(
int
)
(
i_seconds
%
60
)
);
}
else
{
snprintf
(
psz_buffer
,
MSTRTIME_MAX_SIZE
,
"%2.2d:%2.2d"
,
(
int
)
i_mins
,
(
int
)
(
i_seconds
%
60
)
);
}
return
(
psz_buffer
);
}
...
...
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