File: GetBusTicksTick.m

package info (click to toggle)
psychtoolbox-3 3.0.19.14.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,796 kB
  • sloc: ansic: 176,245; cpp: 20,103; objc: 5,393; sh: 2,753; python: 1,397; php: 384; makefile: 193; java: 113
file content (39 lines) | stat: -rw-r--r-- 1,271 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function busTickPeriod = GetBusTicksTick

% busTickPeriod = GetBusTicksTick
%
% OS X: ___________________________________________________________________
%
% Return the period of the GetBusTicks clock.  The period of the
% GetBusTicks clock depends on your model of CPU and its clock speed.
% For reliable high-precision timing in standard units of seconds use
% GetSecs instead of GetBusTicks.
%
% GetBusTicksTick returns the period of the GetBusTicks clock.  The
% frequency is found in the hw.busfreq field of the struct returned by
% Screen('Computer').
%
% OS 9: ___________________________________________________________________
%
% GetBusTicksTick does not exist in OS 9. 
%
% WINDOWS: ________________________________________________________________
% 
% GetBusTicksTick does not exist in Windows.
% 
% _________________________________________________________________________
%
% SEE ALSO: GetBusTicks, GetSecs, GetSecsTick, Screen('Computer') 

%   HISTORY:
%   04/18/03    awi    Wrote GetBusTick.m
%   7/10/04     awi    Improved.        
%   7/12/04     awi    Added OS 9 and Windows sections.

if IsOSX
    cInfo=Screen('Computer');
    busTickPeriod=1/cInfo.hw.busfreq;
else
    error(['GetBusTick function not implemented on platform ' computer ]);
end