mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	add pa_timespec_load
This commit is contained in:
		
							parent
							
								
									45218aa226
								
							
						
					
					
						commit
						9cbdd3a968
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -141,3 +141,11 @@ struct timeval* pa_rtclock_from_wallclock(struct timeval *tv) {
 | 
			
		|||
 | 
			
		||||
    return tv;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pa_usec_t pa_timespec_load(const struct timespec *ts) {
 | 
			
		||||
    pa_assert(ts);
 | 
			
		||||
 | 
			
		||||
    return
 | 
			
		||||
        (pa_usec_t) ts->tv_sec * PA_USEC_PER_SEC +
 | 
			
		||||
        (pa_usec_t) ts->tv_nsec / PA_NSEC_PER_USEC;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,4 +42,6 @@ void pa_rtclock_hrtimer_enable(void);
 | 
			
		|||
 | 
			
		||||
struct timeval* pa_rtclock_from_wallclock(struct timeval *tv);
 | 
			
		||||
 | 
			
		||||
pa_usec_t pa_timespec_load(const struct timespec *ts);
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue