Net::Time - 時間和日間網路用戶端介面
use Net::Time qw(inet_time inet_daytime);
print inet_time(); # use default host from Net::Config
print inet_time('localhost');
print inet_time('localhost', 'tcp');
print inet_daytime(); # use default host from Net::Config
print inet_daytime('localhost');
print inet_daytime('localhost', 'tcp');
Net::Time
提供在遠端機器上取得時間的子常式。
inet_time([$host[, $protocol[, $timeout]]])
在 $host
上取得時間,如果 $host
未提供或未定義,則使用一些預設主機,使用 RFC868 中定義的協定。可選參數 $protocol
應定義要使用的協定,tcp
或 udp
。結果將是與 time() 回傳的相同單位時間值,或在失敗時為 undef。
inet_daytime([$host[, $protocol[, $timeout]]])
使用 RFC867 中定義的協定,取得 $host
上的時間,或是在未提供或未定義 $host
時使用一些預設主機。選用的引數 $protocol
應定義要使用的協定,可能是 tcp
或 udp
。結果會是 ASCII 字串或在失敗時為 undef。
下列符號是由這個模組匯出,或可以由這個模組匯出
無.
Graham Barr <gbarr@pobox.com>。
Steve Hay <shay@cpan.org> 目前維護 libnet,版本為 1.22_02。
版權所有 (C) 1995-2004 Graham Barr。保留所有權利。
版權所有 (C) 2014, 2020 Steve Hay。保留所有權利。
這個模組是自由軟體;您可以在與 Perl 相同的條款下重新散布或修改它,亦即在 GNU 通用公共授權或 Artistic 授權的條款下,如 LICENCE 檔案中所指定。
版本 3.15
2023 年 3 月 20 日
請參閱 Changes 檔案。