суббота, 21 июля 2012 г.

IronRuby Timer

Все очень просто:
1) Подключаем
include System::Threading
2) Собственно сам таймер
@timer=System::Windows::Threading::DispatcherTimer.new
@timer.Interval=System::TimeSpan.new(0, 0, 1);#1 секунда
@timer.Tick{some_function}
@timer.Start
3) Чтобы остановить
@timer.Stop
Вот и все.