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
519fe4ca
Commit
519fe4ca
authored
Sep 13, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: also implement timer:getoverrun()
parent
d45d5293
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
modules/misc/lua/libs/misc.c
modules/misc/lua/libs/misc.c
+14
-2
No files found.
modules/misc/lua/libs/misc.c
View file @
519fe4ca
...
...
@@ -248,10 +248,12 @@ static int vlclua_action_id( lua_State *L )
* Timer functions
*****************************************************************************/
static
int
vlclua_timer_schedule
(
lua_State
*
L
);
static
int
vlclua_timer_getoverrun
(
lua_State
*
L
);
static
const
luaL_Reg
vlclua_timer_reg
[]
=
{
{
"schedule"
,
vlclua_timer_schedule
},
{
NULL
,
NULL
}
{
"schedule"
,
vlclua_timer_schedule
},
{
"getoverrun"
,
vlclua_timer_getoverrun
},
{
NULL
,
NULL
}
};
typedef
struct
...
...
@@ -275,6 +277,16 @@ static int vlclua_timer_schedule( lua_State *L )
return
0
;
}
static
int
vlclua_timer_getoverrun
(
lua_State
*
L
)
{
vlclua_timer_t
**
pp_timer
=
(
vlclua_timer_t
**
)
luaL_checkudata
(
L
,
1
,
"timer"
);
if
(
!
pp_timer
||
!*
pp_timer
)
luaL_error
(
L
,
"Can't get pointer to timer"
);
lua_pushinteger
(
L
,
vlc_timer_getoverrun
(
(
*
pp_timer
)
->
timer
)
);
return
1
;
}
static
void
vlclua_timer_callback
(
void
*
data
)
{
vlclua_timer_t
*
p_timer
=
(
vlclua_timer_t
*
)
data
;
...
...
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