views:

163

answers:

1

Has anybody here successfully installed the system_timer gem on Windows? I have devkit on my machine and I am able to install other native gems. I get the following error when I install the gem.

In file included from system_timer_native.c:2:
c:/Ruby19/include/ruby-1.9.1/ruby/backward/rubysig.h:14:2: warning: 
    #warning rubysig.h is obsolete
system_timer_native.c: In function `install_timer':
system_timer_native.c:28: error: storage size of 'timer_interval' isn't known
system_timer_native.c:33: warning: implicit declaration of function `sigprocmask'

The gem home page states that it doesn't work on Windows

SystemTimer  only works on UNIX platforms (Mac OS X, Linux, Solaris, BSD, …). 
You can install the gem on Microsoft Windows, but you will only get a 
convenience shell wrapping a simple call to timeout.rb under the cover.

I am on Ruby 1.9, Since the threading model is different in 1.9, I am wondering if gem will work in 1.9.

+1  A: 

The problem isn't with Ruby's threading system, it's with the Windows kernel's timer system, I believe.

System Timer, a timer based on underlying SIGALRM system timers, is a solution to Ruby processes which hang beyond the time limit when accessing external resources. This is useful when timeout.rb, which relies on green threads, does not work consistently.

You are better off asking directly the makers of the gem whether they have support for Windows+1.9 in the pipeline (if it's possible at all).

Trevoke