diff options
| author | 2014-03-19 21:29:13 +0100 | |
|---|---|---|
| committer | 2014-03-24 17:01:30 +0100 | |
| commit | 427da9b898ad6d6d6b091b375f9fc38f155b4813 (patch) | |
| tree | 146baa967432cb9b215b6a2a2da87d9cf7b6d1bc /src/device.c | |
| parent | f87407aacfd335398cc6897d3d65103f20ead20a (diff) | |
| download | usbmuxd-427da9b898ad6d6d6b091b375f9fc38f155b4813.tar.gz usbmuxd-427da9b898ad6d6d6b091b375f9fc38f155b4813.tar.bz2 | |
device/utils: move mstime64() into utils since it is generally useful
Diffstat (limited to 'src/device.c')
| -rw-r--r-- | src/device.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/device.c b/src/device.c index ef97f72..e36509e 100644 --- a/src/device.c +++ b/src/device.c | |||
| @@ -120,16 +120,6 @@ struct mux_device | |||
| 120 | static struct collection device_list; | 120 | static struct collection device_list; |
| 121 | pthread_mutex_t device_list_mutex; | 121 | pthread_mutex_t device_list_mutex; |
| 122 | 122 | ||
| 123 | static uint64_t mstime64(void) | ||
| 124 | { | ||
| 125 | struct timeval tv; | ||
| 126 | gettimeofday(&tv, NULL); | ||
| 127 | |||
| 128 | // Careful, avoid overflow on 32 bit systems | ||
| 129 | // time_t could be 4 bytes | ||
| 130 | return ((long long)tv.tv_sec) * 1000LL + ((long long)tv.tv_usec) / 1000LL; | ||
| 131 | } | ||
| 132 | |||
| 133 | static struct mux_device* get_mux_device_for_id(int device_id) | 123 | static struct mux_device* get_mux_device_for_id(int device_id) |
| 134 | { | 124 | { |
| 135 | struct mux_device *dev = NULL; | 125 | struct mux_device *dev = NULL; |
