Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ac15b24b
Commit
ac15b24b
authored
Aug 19, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't call mdate too many times.
parent
98ea2ba6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
modules/misc/logger.c
modules/misc/logger.c
+3
-2
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+3
-2
modules/visualization/galaktos/plugin.c
modules/visualization/galaktos/plugin.c
+4
-3
src/misc/stats.c
src/misc/stats.c
+3
-2
No files found.
modules/misc/logger.c
View file @
ac15b24b
...
...
@@ -435,9 +435,10 @@ static void HtmlPrint( const msg_item_t *p_msg, FILE *p_file )
static
void
DoRRD
(
intf_thread_t
*
p_intf
)
{
if
(
mdate
()
-
p_intf
->
p_sys
->
last_update
<
1000000
)
mtime_t
now
=
mdate
();
if
(
now
-
p_intf
->
p_sys
->
last_update
<
1000000
)
return
;
p_intf
->
p_sys
->
last_update
=
mdate
()
;
p_intf
->
p_sys
->
last_update
=
now
;
if
(
p_intf
->
p_libvlc
->
p_stats
)
{
...
...
modules/services_discovery/sap.c
View file @
ac15b24b
...
...
@@ -820,8 +820,9 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
p_announce
->
i_period_trust
++
;
/* Compute the average period */
p_announce
->
i_period
=
(
p_announce
->
i_period
+
(
mdate
()
-
p_announce
->
i_last
))
/
2
;
p_announce
->
i_last
=
mdate
();
mtime_t
now
=
mdate
();
p_announce
->
i_period
=
(
p_announce
->
i_period
+
(
now
-
p_announce
->
i_last
))
/
2
;
p_announce
->
i_last
=
now
;
}
FreeSDP
(
p_sdp
);
p_sdp
=
NULL
;
return
VLC_SUCCESS
;
...
...
modules/visualization/galaktos/plugin.c
View file @
ac15b24b
...
...
@@ -248,14 +248,15 @@ static void* Thread( vlc_object_t *p_this )
free
(
p_thread
->
psz_title
);
p_thread
->
psz_title
=
NULL
;
mtime_t
now
=
mdate
();
if
(
++
count
%
100
==
0
)
{
realfps
=
100
/
((
mdate
()
/
1000
-
fpsstart
)
/
1000
);
realfps
=
100
/
((
now
/
1000
-
fpsstart
)
/
1000
);
// printf("%f\n",realfps);
fpsstart
=
mdate
()
/
1000
;
fpsstart
=
now
/
1000
;
}
//framerate limiter
timed
=
mspf
-
(
mdate
()
/
1000
-
timestart
);
timed
=
mspf
-
(
now
/
1000
-
timestart
);
// printf("%d,%d\n",time,mspf);
if
(
timed
>
0
)
msleep
(
1000
*
timed
);
// printf("Limiter %d\n",(mdate()/1000-timestart));
...
...
src/misc/stats.c
View file @
ac15b24b
...
...
@@ -513,11 +513,12 @@ static int CounterUpdate( vlc_object_t *p_handler,
case
STATS_DERIVATIVE
:
{
counter_sample_t
*
p_new
,
*
p_old
;
if
(
mdate
()
-
p_counter
->
last_update
<
p_counter
->
update_interval
)
mtime_t
now
=
mdate
();
if
(
now
-
p_counter
->
last_update
<
p_counter
->
update_interval
)
{
return
VLC_EGENERIC
;
}
p_counter
->
last_update
=
mdate
()
;
p_counter
->
last_update
=
now
;
if
(
p_counter
->
i_type
!=
VLC_VAR_FLOAT
&&
p_counter
->
i_type
!=
VLC_VAR_INTEGER
)
{
...
...
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