prg_date_time_window_calculate()

摘要

为指定的时间间隔确定起始和结束时间。

语法

prg_date_time_window_calculate (baseline_date_time, offset_intervals, type, start_date_time_ptr, end_date_time_ptr)
参数 类型 说明
baseline_date_time PrgT_Date 作为基准的关注时间。
offset_intervals int 偏移量,以时间间隔数计。
type PrgT_Date_Interval_Type 所用时间间隔的类型;为表 1所列符号常量之一。
start_date_time_ptr PrgT_Date * 用于保存计算出的间隔起始时间的区域。
end_date_time_ptr PrgT_Date * 用于保存计算出的间隔结束时间的区域。

返回类型

PrgT_Compcode

成功计算出时间窗口时返回 PrgC_Compcode_Success;否则返回 PrgC_Compcode_Failure。

头文件

prg_date.h

详情

该函数根据基准时间、间隔类型和偏移量(负数:过去,正数:将来,零:当前),计算基准时间之前或之后(或包含基准时间)的时间窗口的起始与结束。例如,若 offset_intervals 为 -1 且 type 为 PrgC_Date_Interval_Day,该函数返回基准时间所在日期之前一个日历日的时间窗口。

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com