mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00

The BIF was not returning an IntervalVal which has an overriden ValDescribe() method that allows for prettier printing like "6.0 secs" instead of just "6.0".
13 lines
286 B
Text
13 lines
286 B
Text
#
|
|
# @TEST-EXEC: zeek -b %INPUT >out
|
|
# @TEST-EXEC: btest-diff out
|
|
|
|
event zeek_init()
|
|
{
|
|
local a = double_to_interval(1234563.140);
|
|
print type_name(a), a;
|
|
local b = double_to_interval(-1234563.14);
|
|
print type_name(b), b;
|
|
local c = double_to_interval(6.0);
|
|
print type_name(c), c;
|
|
}
|