File: callback.h

package info (click to toggle)
golang-github-mattn-go-pointer 0.0~git20200722.90e3959-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 76 kB
  • sloc: ansic: 6; makefile: 2
file content (9 lines) | stat: -rw-r--r-- 147 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
#include <unistd.h>

typedef void (*callback)(void*);

static void call_later(int delay, callback cb, void* data) {
  sleep(delay);
  cb(data);
}