?? linuxrealtime.pm
字號:
package LinuxRealTime;# Thanks to SWIG for creating parts of this filerequire Exporter;require DynaLoader;our @ISA = qw(Exporter DynaLoader);our @EXPORT = qw();package LinuxRealTimec;bootstrap LinuxRealTime;package LinuxRealTime;our $VERSION = '0.01';*setRealTime = *LinuxRealTimec::setRealTime;1;__END__=head1 NAMELinuxRealTime - Perl extension for setting real time priority=head1 SYNOPSIS use LinuxRealTime; LinuxRealTime::setRealTime(10); # freeze the computer for a while my $j; my $i; foreach $j (0..30_000_000) { $i = sqrt ($j); }=head1 DESCRIPTIONCalling LinuxRealTime::setRealTime(10) sets the scheduling method of the current taskto SCHED_FIFO with a priority of 10 (if the script is executed by root). The parameterspecifies the priority, so different scripts can run with different priorities.SCHED_FIFO is used to build real time applications. The linux kernel (>= 2.6) schedules all tasks using SCHED_FIFO _before_ any other "interactive task". Therefore all CPU resources are then used by the Perl skript.This can be used to meassure execution times or to build real time applications.!!!!! BE CAREFULL !!!!!Be CAREFULL with scripts that have long execution times. Once started as root,you will not even be able to send a CTRL-C to your script as the shell or X won't get any CPU ressources.=head2 EXPORTNone by default.=head1 SEE ALSO=head1 AUTHORDaniel Zinn, E<lt>perl-public@qmic.de<gt>=head1 COPYRIGHT AND LICENSECopyright (C) 2005 by Daniel ZinnThis library is free software; you can redistribute it and/or modifyit under the same terms as Perl itself. =cut
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -