Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
0c0400b6
Commit
0c0400b6
authored
Sep 20, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
io_thread: add function _timeout_add()
Same as _timeout_add_seconds(), but this one has millisecond resolution.
parent
2e83af7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
io_thread.c
src/io_thread.c
+9
-0
io_thread.h
src/io_thread.h
+4
-0
No files found.
src/io_thread.c
View file @
0c0400b6
...
...
@@ -124,6 +124,15 @@ io_thread_idle_add(GSourceFunc function, gpointer data)
}
GSource
*
io_thread_timeout_add
(
guint
interval_ms
,
GSourceFunc
function
,
gpointer
data
)
{
GSource
*
source
=
g_timeout_source_new
(
interval_ms
);
g_source_set_callback
(
source
,
function
,
data
,
NULL
);
g_source_attach
(
source
,
io
.
context
);
return
source
;
}
GSource
*
io_thread_timeout_add_seconds
(
guint
interval
,
GSourceFunc
function
,
gpointer
data
)
{
...
...
src/io_thread.h
View file @
0c0400b6
...
...
@@ -64,6 +64,10 @@ io_thread_idle_add(GSourceFunc function, gpointer data);
G_GNUC_MALLOC
GSource
*
io_thread_timeout_add
(
guint
interval_ms
,
GSourceFunc
function
,
gpointer
data
);
G_GNUC_MALLOC
GSource
*
io_thread_timeout_add_seconds
(
guint
interval
,
GSourceFunc
function
,
gpointer
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