程序包 cn.vorbote.time

类 TimeSpan


  • public class TimeSpan
    extends Object
    Represents a time interval. We use this class to show diffs from 2 DateTime instances.
    作者:
    vorbote thills@vorbote.cn
    • 构造器详细资料

      • TimeSpan

        public TimeSpan()
    • 方法详细资料

      • getDays

        public int getDays()
        Getter for field days.
        返回:
        The value of days.
      • getHours

        public int getHours()
        Getter for field hours.
        返回:
        The value of hours.
      • getMinutes

        public int getMinutes()
        Getter for field minutes.
        返回:
        The value of minutes.
      • getSeconds

        public int getSeconds()
        Getter for field seconds.
        返回:
        The value of seconds.
      • getMilliseconds

        public int getMilliseconds()
        Getter for field milliseconds.
        返回:
        The value of milliseconds.
      • setDays

        protected void setDays​(int days)
        Setter for field days.
        参数:
        days - The value of days.
      • setHours

        protected void setHours​(int hours)
        Setter for field hours.
        参数:
        hours - The value of hours.
      • setMinutes

        protected void setMinutes​(int minutes)
        Setter for field minutes.
        参数:
        minutes - The value of minutes.
      • setSeconds

        protected void setSeconds​(int seconds)
        Setter for field seconds.
        参数:
        seconds - The value of seconds.
      • setMilliseconds

        protected void setMilliseconds​(int milliseconds)
        Setter for field milliseconds.
        参数:
        milliseconds - The value of milliseconds.
      • TotalSeconds

        public long TotalSeconds()
        Get the total seconds in this TimeSpan.
        返回:
        The total seconds in this TimeSpan.
      • TotalMilliseconds

        public long TotalMilliseconds()
        Get the total milliseconds in this TimeSpan.
        返回:
        The total milliseconds in this TimeSpan.