def getRefreshRate(screen=0):
 if importCtypesFailed:
  return False
 scrID = getScreen(screen)
 mode = cocoa.CGDisplayCurrentMode(scrID)
 refreshCF = cocoa.CFDictionaryGetValue(mode, _create_cfstring('RefreshRate'))
 refresh = ctypes.c_long()
 cocoa.CFNumberGetValue(refreshCF, kCFNumberLongType, ctypes.byref(refresh))
 if (refresh.value == 0):
  return 60
 else:
  return refresh.value

def getRefreshRate ( screen = 0 ) : if importCtypesFailed : return False scrID = getScreen ( screen ) mode = cocoa . CGDisplayCurrentMode ( scrID ) refreshCF = cocoa . CFDictionaryGetValue ( mode , _create_cfstring ( 'RefreshRate' ) ) refresh = ctypes . c_long ( ) cocoa . CFNumberGetValue ( refreshCF , kCFNumberLongType , ctypes . byref ( refresh ) ) if ( refresh . value == 0 ) : return 60 else : return refresh . value
return the refresh rate of the given screen nb .