WO2021014614A1 - 時刻同期装置、時刻同期方法及び時刻同期プログラム - Google Patents

時刻同期装置、時刻同期方法及び時刻同期プログラム Download PDF

Info

Publication number
WO2021014614A1
WO2021014614A1 PCT/JP2019/029049 JP2019029049W WO2021014614A1 WO 2021014614 A1 WO2021014614 A1 WO 2021014614A1 JP 2019029049 W JP2019029049 W JP 2019029049W WO 2021014614 A1 WO2021014614 A1 WO 2021014614A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
external
conversion
internal clock
unique
Prior art date
Application number
PCT/JP2019/029049
Other languages
English (en)
French (fr)
Inventor
潤 矢吹
亮 岡部
圭祐 堀井
正勝 外山
樋口 毅
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2019/029049 priority Critical patent/WO2021014614A1/ja
Priority to JP2019571557A priority patent/JP6682055B1/ja
Priority to GB2115864.7A priority patent/GB2599022B/en
Priority to KR1020227001043A priority patent/KR102388889B1/ko
Publication of WO2021014614A1 publication Critical patent/WO2021014614A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G7/00Synchronisation
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G5/00Setting, i.e. correcting or changing, the time-indication

Definitions

  • the present invention relates to a technique for synchronizing an internal clock with an external time acquired from an external clock.
  • Patent Document 1 describes that the time is adjusted based on the comparison result between the external time obtained from the external clock and the time of the internal clock. In Patent Document 1, the reliability of the internal clock is improved by this.
  • the management range which is the time range that the device can manage.
  • the time management variable overflows when 2038 is reached, and it is out of the control range.
  • the problem that the time management variable overflows when 2038 is reached is called the 2038 problem.
  • An object of the present invention is to make it possible to appropriately synchronize the time even when the control range is limited.
  • the time synchronization device is A time acquisition unit that acquires the external time, which is the time of the external clock, The external time acquired by the time acquisition unit is transmitted to the time conversion device to convert the external time into a unique time that is within the control range of the internal clock, and the unique time is set in the internal clock. It has an internal clock setting unit.
  • the external time is converted into a unique time that is within the control range of the internal clock, and then set in the internal clock.
  • the time outside the control range is not set in the internal clock, and the time can be synchronized appropriately.
  • FIG. 5 is a flowchart of a process in which the time synchronization device 10 according to the first embodiment synchronizes the time of the internal clock 14 with the time of the external clock 51.
  • FIG. 5 is a flowchart of a process in which the time synchronization device 10 according to the first embodiment uses the time of the internal clock 14.
  • FIG. 5 is an explanatory diagram of a process in which the time synchronization device 10 according to the second embodiment synchronizes the time of the internal clock 14 with the external NTP time of the NTP server.
  • FIG. 5 is an explanatory diagram of a process in which the time synchronization device 10 according to the second embodiment synchronizes the time of the internal clock 14 with the external NTP time of the NTP server.
  • the explanatory view of the setting method of the conversion time which concerns on Embodiment 2.
  • Explanatory drawing of NTP (Network Time Protocol) time and UN time The flowchart of the time inverse conversion processing which concerns on Embodiment 2.
  • FIG. 5 is a flowchart of a process in which the time synchronization device 10 according to the third embodiment synchronizes the time of the internal clock 14 with the external PTP time of the PTP (Precision Time Protocol) master.
  • FIG. 5 is an explanatory diagram of a process in which the time synchronization device 10 according to the third embodiment synchronizes the time of the internal clock 14 with the external PTP time of the PTP master.
  • the flowchart of the time conversion process which concerns on Embodiment 3. Explanatory drawing of NTP time, UN time and PTP time.
  • the time synchronization device 10 is a device that acquires time information from the time distribution device 50 and synchronizes the time.
  • the time synchronization device 10 includes hardware of a clock transmitter 11, a processor 12, a NIC 13 (Network Interface Card), an internal clock 14, a main memory 15, and a peripheral 16.
  • the processor 12 is connected to other hardware via a signal line 17.
  • the clock transmitter 11 is an element or device that supplies an operating clock to the processor 12.
  • the processor 12 is an element or device that performs software processing such as time synchronization.
  • the NIC 13 is an element or device that transmits / receives packets to / from an external device such as a time distribution device 50.
  • the internal clock 14 is an element or device that holds the internal time in the time synchronization device 10.
  • the main memory 15 is an element or device that holds instructions and data necessary for software processing.
  • the peripheral 16 is an element or device that inputs / outputs the time synchronization device 10.
  • the time distribution device 50 is a device provided with an external clock 51 and distributes an external time, which is the time of the external clock 51, in response to a request from an device connected via a transmission line 61.
  • the external clock 51 is an element or device that always holds an accurate time.
  • the time synchronization device 10 has, as functional components, a time acquisition unit 21, an internal clock setting unit 22, a time management unit 23, an internal clock reference unit 24, a time use unit 25, a time conversion unit 26, and a time. It includes an inverse conversion unit 27.
  • the internal clock setting unit 22 includes a conversion acquisition unit 221.
  • the internal clock reference unit 24 includes a post-conversion acquisition unit 241.
  • the function of each functional component is realized by software. Specifically, a program that realizes the functions of each functional component is read into the main memory 15 by the processor 12 and executed by the processor 12. As a result, the functions of each functional component are realized.
  • the program that realizes the functions of each functional component is stored in a storage medium such as an HDD (Hard Disk Drive), and is read via the peripheral 16.
  • HDD Hard Disk Drive
  • the time conversion unit 26 and the time inverse conversion unit 27 are functional components of the time conversion device 40.
  • the time synchronization device 10 is configured to include the time conversion device 40.
  • the time conversion device 40 may be configured as a device different from the time synchronization device 10. In this case, the time synchronization device 10 and the time conversion device 40 are connected via the transmission line 62.
  • the time acquisition unit 21 is a function of acquiring the external time of the external clock 51 from the time distribution device 50.
  • the internal clock setting unit 22 is a function of setting the unique time obtained by converting the external time acquired by the time acquisition unit 21 by the time conversion unit 26 into the internal clock 14.
  • the post-conversion acquisition unit 221 is a function of passing the time between the internal clock setting unit 22 and the time conversion unit 26.
  • the time management unit 23 is a function of managing the internal clock 14.
  • the internal clock reference unit 24 is a function of referring to the internal clock 14 and acquiring a reference time obtained by converting the internal time, which is the time indicated by the internal clock, by the time inverse conversion unit 27.
  • the reverse conversion acquisition unit 241 is a function of passing the time between the internal clock reference unit 24 and the time reverse conversion unit 27.
  • the time use unit 25 is a function of using the reference time acquired by the internal clock reference unit 24.
  • the time conversion unit 26 is a function of performing conversion that shifts the time by the conversion time.
  • the time inverse conversion unit 27 is a function of performing inverse conversion that shifts the time by the conversion time in the direction opposite to that of the time conversion unit 26.
  • the operation of the time synchronization device 10 according to the first embodiment will be described with reference to FIGS. 4 to 7.
  • the operation procedure of the time synchronization device 10 according to the first embodiment corresponds to the time synchronization method according to the first embodiment.
  • the program that realizes the operation of the time synchronization device 10 according to the first embodiment corresponds to the time synchronization program according to the first embodiment.
  • Step S11 Time acquisition process
  • the time acquisition unit 21 acquires the external time of the external clock 51 from the time distribution device 50 via the NIC 13.
  • the time acquisition unit 21 writes the acquired external time to the main memory 15.
  • Step S12 Time conversion process
  • the internal clock setting unit 22 transmits the external time acquired in step S11 to the time conversion unit 26 via the conversion acquisition unit 221 and sets the external time to a unique time that is within the control range of the internal clock 14. To convert to.
  • Step S13 Internal clock setting process
  • the internal clock setting unit 22 sets the unique time in the internal clock 14 by passing the unique time obtained by conversion in step S12 to the time management unit 23.
  • step S11 After a certain period of time has elapsed, the process is returned to step S11 again. As a result, the time of the internal clock 14 is synchronized with the time of the external clock 51 again after a certain period of time has elapsed.
  • Step S21 Time transmission process
  • the internal clock setting unit 22 reads the external time acquired in step S11 from the main memory 15.
  • the internal clock setting unit 22 transmits the external time to the time conversion unit 26 via the conversion acquisition unit 221.
  • the time conversion unit 26 acquires the transmitted external time.
  • Step S22 Conversion process
  • the time conversion unit 26 converts the external time into a unique time by adding the conversion time to the external time acquired in step S21.
  • the conversion time is a positive time when advancing the time to the future and a negative time when the time is set back in the past.
  • Step S23 Time return process
  • the time conversion unit 26 transmits the unique time obtained by conversion in step S22 to the conversion unit 221 after conversion.
  • the internal clock setting unit 22 acquires the transmitted unique time via the converted acquisition unit 221.
  • Step S31 Time reading process
  • the internal clock reference unit 24 reads out the internal time, which is the time indicated by the internal clock 14, by requesting the time management unit 23.
  • the internal clock reference unit 24 writes the read internal time to the main memory 15.
  • Step S32 Inverse time conversion process
  • the internal clock reference unit 24 transmits the internal time read in step S31 to the time inverse conversion unit 27 via the acquisition unit 241 after the inverse conversion, and reverses the process of converting the external time into the unique time. Is performed to convert the internal time to the reference time.
  • Step S33 Time use process
  • the time use unit 25 performs processing using the reference time obtained by conversion in step S32.
  • the time-using unit 25 performs processing using the reference time obtained by converting the internal time, instead of the internal time indicated by the internal clock 14.
  • Step S41 Time transmission process
  • the internal clock reference unit 24 reads the internal time read in step S31 from the main memory 15.
  • the internal clock reference unit 24 transmits the internal time to the time inverse conversion unit 27 via the acquisition unit 241 after the inverse conversion.
  • the time inverse conversion unit 27 acquires the transmitted internal time.
  • Step S42 Inverse conversion process
  • the time inverse conversion unit 27 converts the internal time into a reference time by subtracting the conversion time from the internal time acquired in step S41.
  • Step S43 Time return process
  • the time inverse conversion unit 27 transmits the reference time converted and obtained in step S42 to the acquisition unit 241 after the inverse conversion.
  • the internal clock reference unit 24 acquires the transmitted reference time via the acquisition unit 241 after inverse conversion.
  • the time synchronization device 10 sets the internal clock 14 after converting the external time into a unique time that is within the control range of the internal clock. As a result, the time outside the control range is not set in the internal clock, and the time can be synchronized appropriately.
  • the time synchronization device 10 converts the internal time, which is the time indicated by the internal clock 14, into a reference time by performing the reverse processing of the processing of converting the external time into a unique time. Used in. As a result, the processing can be performed using the time synchronized with the external time.
  • FIG. 8 shows the relationship between the external time of the external clock 51 and the internal time of the internal clock 14 when the time synchronization device 10 synchronizes the time with the external clock 51.
  • the conversion is performed so that the internal time is earlier than the external time by the conversion time.
  • the internal clock 14 operates while maintaining an interval of a fixed time (conversion time) from the external time of the external clock 51 while synchronizing with the external clock 51.
  • each functional component is realized by software.
  • each functional component may be realized by hardware. The difference between the first modification and the first embodiment will be described.
  • the time synchronization device 10 When each functional component is realized by hardware, the time synchronization device 10 includes an electronic circuit instead of the processor 12 and the main memory 15.
  • the electronic circuit is a dedicated circuit that realizes the functions of each functional component and the main memory 15.
  • each functional component may be realized by one electronic circuit, or each functional component may be distributed and realized by a plurality of electronic circuits.
  • Modification 2> As a modification 2, some functional components may be realized by hardware, and other functional components may be realized by software.
  • Embodiment 2 a specific example of the operation of the time synchronization device 10 described in the first embodiment will be described.
  • the Year 2038 problem is used as an example of the case where the control range, which is the range of the time that the time synchronization device 10 can manage, is limited.
  • the year 2038 problem is a problem in which the time management variables overflow in the 32-bit version of Linux (registered trademark) when 2038 is reached.
  • Linux (registered trademark) manages the time by having the UNIX (registered trademark) time in the internal clock of the system.
  • the UNIX (registered trademark) time will be referred to as a UNIX time.
  • the UN time is a time represented by the number of seconds elapsed from the base year, with midnight on January 1, 1970 as the base year. Since the system internal clock is defined as a signed integer type, in the case of the 32-bit version of Linux (registered trademark), the time management variable overflows after 3:14:07 on January 19, 2038.
  • the hardware configuration of the time synchronization device 10 is the same as the hardware configuration of the time synchronization device 10 according to the first embodiment shown in FIG.
  • the processor 12 is a 32-bit processor.
  • the time distribution device 50 is a device that distributes time information that can be received by a Linux (registered trademark) system, such as an NTP (Network Time Protocol) server or a GPS (Global Positioning System) satellite. In the second embodiment, the time distribution device 50 will be described as an NTP server.
  • the functional configuration of the time synchronization device 10 is the same as the functional configuration of the time synchronization device 10 according to the first embodiment shown in FIG.
  • the time acquisition unit 21, the internal clock setting unit 22, and the time conversion unit 26 are realized by the NTP client.
  • the time management unit 23 is realized by Kernel of Linux (registered trademark).
  • the internal clock setting unit 22 converts the NTP time, which is an external time acquired from the NTP server, into a unique time, calculates the UN time, and sets the internal clock 14.
  • the operation of the time synchronization device 10 according to the second embodiment will be described with reference to FIGS. 9 to 13.
  • the operation procedure of the time synchronization device 10 according to the second embodiment corresponds to the time synchronization method according to the second embodiment.
  • the program that realizes the operation of the time synchronization device 10 according to the second embodiment corresponds to the time synchronization program according to the second embodiment.
  • the external time acquired from the NTP server is referred to as an external NTP time.
  • the unique time obtained by converting the external NTP time is called the unique NTP time.
  • the UN time obtained by converting the external NTP time is called the external UN time.
  • the UN time obtained by converting the unique NTP time is called the unique UN time.
  • Step S51 Time transmission process
  • the internal clock setting unit 22 reads the external NTP time, which is the external time acquired in step S11, from the main memory 15.
  • the internal clock setting unit 22 transmits the external NTP time to the time conversion unit 26 via the conversion acquisition unit 221.
  • the time conversion unit 26 acquires the transmitted external NTP time.
  • Step S52 Unique conversion process
  • the time conversion unit 26 converts the external NTP time into the unique NTP time by adding the conversion time to the external NTP time acquired in step S51. Specifically, the time conversion unit 26 converts the external NTP time into a unique NTP time, which is a time within the control range of the internal clock 14, by adding the conversion time.
  • the time conversion unit 26 sets the conversion time so that the unique NTP time is as early as possible within the management range. As a result, it is possible to extend the period during which the time can be managed within the management range without changing the conversion time.
  • the time conversion unit 26 sets the conversion time so that the unique NTP time is as close as possible to midnight on January 1, 1970, which is the base year of the UN time.
  • the time conversion unit 26 sets the conversion time so that the number of periodic fluctuations, which is the periodic fluctuation of the time regardless of the time system of the external time, is the same.
  • the time conversion unit 26 may set the conversion time in consideration of this rule, if necessary.
  • Step S53 UN conversion process
  • the time conversion unit 26 converts the unique NTP time obtained by conversion in step S52 into the unique UN time.
  • the NTP time and the UN time have different base years.
  • UTC Coordinatd Universal Time
  • both NTP time and UN time use UTC (Coordinated Universal Time), which considers leap seconds, as the time system. Therefore, when converting the NTP time to the UN time, a fixed time due to the difference in the base year may be added.
  • Step S54 Time return process
  • the time conversion unit 26 transmits the unique UN time converted and obtained in step S53 to the conversion acquisition unit 221.
  • the internal clock setting unit 22 acquires the transmitted unique UN time via the converted acquisition unit 221. As a result, the unique UN time is set in the internal clock 14 in step S13 of FIG.
  • Step S61 Time transmission process
  • the internal clock reference unit 24 reads the internal UN time, which is the time indicated by the internal clock 14 acquired in step S31, from the main memory 15.
  • the internal clock reference unit 24 transmits the internal UN time to the time inverse conversion unit 27 via the acquisition unit 241 after the inverse conversion.
  • the time inverse conversion unit 27 acquires the transmitted internal UN time.
  • Step S62 Inverse conversion process
  • the time inverse conversion unit 27 converts the internal UN time into the reference UN time by subtracting the conversion time from the internal UN time acquired in step S61. For example, when the conversion time is 40 years, the time inverse conversion unit 27 subtracts ⁇ 1,262,304,000 seconds from the internal UN time.
  • Step S63 Time return process
  • the time inverse conversion unit 27 transmits the reference UN time converted and obtained in step S62 to the acquisition unit 241 after the inverse conversion.
  • the internal clock reference unit 24 acquires the transmitted reference UN time via the acquisition unit 241 after inverse conversion.
  • the reference UN time whose internal UN time is shifted by the conversion time is used.
  • the time use unit 25 has been described as using the UN time. However, when the time-using unit 25 uses the NTP time, it is necessary to further subtract the fixed time due to the difference between the NTP time and the UN time in the reference UN time.
  • the time synchronization device 10 converts the external NTP time into the unique NTP time and then converts it into the unique UN time.
  • the time of the internal clock 14 is managed even when the external time exceeds 2038 and falls within the unmanageable time range. It is possible to operate as a time within the range.
  • the external NTP time is converted to the external UN time. Therefore, if the external time exceeds 2038 and falls within the unmanageable time range, the time of the internal clock 14 becomes the unmanageable time.
  • Embodiment 3 is different from the second embodiment in that a PTP (Precision Time Protocol) master is used as the time distribution device 50 instead of the NTP server.
  • PTP Precision Time Protocol
  • these different points will be described, and the same points will be omitted.
  • the hardware configuration of the time synchronization device 10 is the same as the hardware configuration of the time synchronization device 10 according to the first embodiment shown in FIG.
  • the time distribution device 50 is a PTP master.
  • the functional configuration of the time synchronization device 10 is the same as the functional configuration of the time synchronization device 10 according to the first embodiment shown in FIG.
  • the time acquisition unit 21, the internal clock setting unit 22, and the time conversion unit 26 are realized by the PTP slave.
  • the time management unit 23 is realized by Kernel of Linux (registered trademark).
  • the internal clock setting unit 22 converts the PTP time, which is an external time acquired from the PTP master, into a unique time, calculates the UN time, and sets the internal clock 14.
  • the operation of the time synchronization device 10 according to the third embodiment will be described with reference to FIGS. 15 to 17.
  • the operation procedure of the time synchronization device 10 according to the third embodiment corresponds to the time synchronization method according to the third embodiment.
  • the program that realizes the operation of the time synchronization device 10 according to the third embodiment corresponds to the time synchronization program according to the third embodiment.
  • the external time acquired from the PTP master is referred to as an external PTP time.
  • the UN time obtained by converting the external PTP time is called the external UN time.
  • the UN time obtained by converting the external UN time is called the unique UN time.
  • a process in which the time synchronization device 10 according to the third embodiment synchronizes the time of the internal clock 14 with the external PTP time of the PTP master will be described with reference to FIGS. 15 and 16.
  • the process of setting the external PTP time in the NIC clock and the process of converting the external PTP time indicated by the NIC clock into the UN time and setting it in the internal clock 14 operate in parallel.
  • Step S71 Time acquisition process
  • the time acquisition unit 21 acquires an external PTP time from the PTP master which is the time distribution device 50.
  • the time acquisition unit 21 writes the acquired external PTP time to the main memory 15.
  • Step S72 NIC setting process
  • the internal clock setting unit 22 sets the external PTP time acquired in step S71 to the NIC clock built in the NIC 13.
  • Step S73 Time conversion process
  • the internal clock setting unit 22 reads out the external PTP time indicated by the NIC clock.
  • the internal clock setting unit 22 transmits the read external PTP time to the time conversion unit 26 via the conversion acquisition unit 221 and sets the external PTP time as a unique UN that is within the control range of the internal clock 14. Convert to time.
  • Step S74 Internal clock setting process
  • the internal clock setting unit 22 sets the unique UN time in the internal clock 14 by passing the unique UN time converted and obtained in step S73 to the time management unit 23.
  • Step S81 Time transmission process
  • the internal clock setting unit 22 reads out the external PTP time indicated by the NIC clock.
  • the internal clock setting unit 22 transmits the external PTP time to the time conversion unit 26 via the conversion acquisition unit 221.
  • the time conversion unit 26 acquires the transmitted external PTP time.
  • Step S82 UN conversion process
  • the time conversion unit 26 converts the external PTP time acquired in step S81 into an external UN time.
  • the PTP time used in the PTP master uses TAI (International Atomic Time) as the time system without considering leap seconds.
  • the UN time uses UTC as a time system in consideration of leap seconds. Therefore, when converting the PTP time to the UN time, it is necessary to consider the leap second. However, leap seconds occur irregularly, unlike leap years.
  • the deviation between TAI and UTC is defined as UTCOffset.
  • This UTCOffset is managed by an external server of the time synchronization device 10. Therefore, the time conversion unit 26 converts the external PTP time into the external UN time by acquiring the UTCOffset from the external server and subtracting the UTCOffset from the external PTP time.
  • Step S83 Unique conversion process
  • the time conversion unit 26 converts the external UN time into a unique UN time by adding the conversion time to the external UN time obtained by conversion in step S82. Specifically, the time conversion unit 26 converts the external UN time into a unique UN time which is a time within the control range of the internal clock 14 by adding the conversion time.
  • Step S84 Time return process
  • the time conversion unit 26 transmits the unique UN time converted and obtained in step S83 to the conversion acquisition unit 221.
  • the internal clock setting unit 22 acquires the transmitted unique UN time via the converted acquisition unit 221.
  • the unique UN time is set in the internal clock 14.
  • irregular time fluctuations which are irregular time fluctuations, may occur between the unique time and the external time.
  • the irregular variation is a leap second.
  • the time conversion unit 26 specifies the time that fluctuates due to the irregular fluctuations, converts the specified time and the external time, and calculates the unique time.
  • the time inverse conversion process according to the third embodiment is the same as the time inverse conversion process according to the second embodiment described with reference to FIG.
  • the time synchronization device 10 according to the third embodiment irregularly fluctuates between the time system used in the time synchronization device 10 and the time system used in the time distribution device 50 like a leap second. Appropriate conversion is possible even when
  • time synchronizer 11 clock transmitter, 12 processor, 13 NIC, 14 internal clock, 15 main memory, 16 peripheral, 21 time acquisition unit, 22 internal clock setting unit, 221 post-conversion acquisition unit, 23 time management unit, 24 Internal clock reference unit, 241 reverse conversion acquisition unit, 25 time usage unit, 26 time conversion unit, 27 time reverse conversion unit, 40 time conversion device, 50 time distribution device, 51 external clock, 61 transmission line, 62 transmission line.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Electric Clocks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

時刻同期装置(10)では、時刻取得部(21)は、時刻配信装置(50)から外部時計(51)の時刻である外部時刻を取得する。内部時計設定部(22)は、時刻取得部(21)によって取得された外部時刻を時刻変換装置(40)に送信する。時刻変換部(26)は、外部時刻を内部時計(14)の管理範囲内の時刻である固有時刻に変換する。内部時計設定部(22)は、時刻変換部(26)によって変換されて得られた固有時刻を内部時計(14)に設定する。

Description

時刻同期装置、時刻同期方法及び時刻同期プログラム
 この発明は、外部時計から取得された外部時刻に内部時計を同期させる技術に関する。
 外部時計から取得された外部時刻により内部時計を更新することにより、外部時計に内部時計を同期させる技術がある。
 特許文献1には、外部時計から取得された外部時刻と、内部時計の時刻との比較結果に基づいて時刻修正することが記載されている。特許文献1では、これにより、内部時計の信頼性の向上を図っている。
特開平10-178666号公報
 装置が管理可能な時刻の範囲である管理範囲に制限がある場合がある。具体例としては、32bit版のLinux(登録商標)では、2038年を迎えると時刻管理変数がオーバフローしてしまい、管理範囲外になってしまう。この32bit版のLinux(登録商標)において2038年を迎えると時刻管理変数がオーバフローしてしまう問題は2038年問題と呼ばれる。
 管理範囲に制限がある場合に、単純に外部時刻により内部時計を更新してしまうと、内部時計が正しく更新されない場合がある。内部時計が正しく更新されないと、装置が正しい動作を継続できなくなってしまう。
 この発明は、管理範囲に制限がある場合にも、適切に時刻を同期可能にすることを目的とする。
 この発明に係る時刻同期装置は、
 外部時計の時刻である外部時刻を取得する時刻取得部と、
 前記時刻取得部によって取得された前記外部時刻を時刻変換装置に送信して、前記外部時刻を内部時計の管理範囲内の時刻である固有時刻に変換させ、前記固有時刻を前記内部時計に設定する内部時計設定部と
を備える。
 この発明では、外部時刻を内部時計の管理範囲内の時刻である固有時刻に変換させた上で、内部時計に設定する。これにより、内部時計に管理範囲外の時刻が設定されることがなく、適切に時刻を同期可能になる。
実施の形態1に係る時刻同期装置10のハードウェア構成図。 実施の形態1に係る時刻同期装置10の機能構成図。 実施の形態1に係る時刻同期装置10の変形例についての機能構成図。 実施の形態1に係る時刻同期装置10が内部時計14の時刻を外部時計51の時刻と同期させる処理のフローチャート。 実施の形態1に係る時刻変換処理のフローチャート。 実施の形態1に係る時刻同期装置10が内部時計14の時刻を使用する処理のフローチャート。 実施の形態1に係る時刻逆変換処理のフローチャート。 実施の形態1に係る時刻同期装置10の効果の説明図。 実施の形態2に係る時刻変換処理のフローチャート。 実施の形態2に係る時刻同期装置10が内部時計14の時刻をNTPサーバの外部NTP時刻と同期させる処理の説明図。 実施の形態2に係る変換時間の設定方法の説明図。 NTP(Network Time Protocol)時刻及びUN時刻の説明図。 実施の形態2に係る時刻逆変換処理のフローチャート。 実施の形態2に係る時刻同期装置10の効果の説明図。 実施の形態3に係る時刻同期装置10が内部時計14の時刻をPTP(Precision Time Protocol)マスタの外部PTP時刻と同期させる処理のフローチャート。 実施の形態3に係る時刻同期装置10が内部時計14の時刻をPTPマスタの外部PTP時刻と同期させる処理の説明図。 実施の形態3に係る時刻変換処理のフローチャート。 NTP時刻とUN時刻とPTP時刻との説明図。
 実施の形態1.
 ***構成の説明***
 図1を参照して、実施の形態1に係る時刻同期装置10のハードウェア構成を説明する。
 時刻同期装置10は、時刻配信装置50から時刻情報を取得し、時刻同期を行う装置である。時刻同期装置10は、クロック発信機11と、プロセッサ12と、NIC13(Network Interface Card)と、内部時計14と、メインメモリ15と、ペリフェラル16とのハードウェアを備える。プロセッサ12は、他のハードウェアと信号線17を介して接続されている。
 クロック発信機11は、プロセッサ12に動作クロックを供給する素子又は装置である。プロセッサ12は、時刻同期等のソフトウェアの処理を行う素子又は装置である。NIC13は、時刻配信装置50といった外部の装置とパケットの送受信を行う素子又は装置である。内部時計14は、時刻同期装置10における内部時刻を保持する素子又は装置である。メインメモリ15は、ソフトウェアの処理に必要な命令及びデータを保持する素子又は装置である。ペリフェラル16は、時刻同期装置10の入出力を行う素子又は装置である。
 時刻配信装置50は、外部時計51を備え、伝送路61を介して接続された装置からの要求に応じて、外部時計51の時刻である外部時刻を配信する装置である。外部時計51は、正確な時間を常に保持している素子又は装置である。
 図2を参照して、実施の形態1に係る時刻同期装置10の機能構成を説明する。
 時刻同期装置10は、機能構成要素として、時刻取得部21と、内部時計設定部22と、時刻管理部23と、内部時計参照部24と、時刻使用部25と、時刻変換部26と、時刻逆変換部27とを備える。内部時計設定部22は、変換後取得部221を備える。また、内部時計参照部24は、逆変換後取得部241を備える。
 各機能構成要素の機能は、ソフトウェアによって実現される。具体的には、各機能構成要素の機能を実現するプログラムがプロセッサ12によってメインメモリ15に読み込まれ、プロセッサ12によって実行される。これにより、各機能構成要素の機能が実現される。なお、各機能構成要素の機能を実現するプログラムは、HDD(Hard Disk Drive)といった記憶媒体に記憶されており、ペリフェラル16を介して読み込まれる。
 時刻変換部26と時刻逆変換部27とは、時刻変換装置40の機能構成要素である。図2では、時刻同期装置10が時刻変換装置40を備える構成になっている。しかし、図3に示すように、時刻変換装置40は、時刻同期装置10と別の装置として構成されてもよい。この場合には、時刻同期装置10と時刻変換装置40とは伝送路62を介して接続される。
 時刻取得部21は、時刻配信装置50から外部時計51の外部時刻を取得する機能である。内部時計設定部22は、時刻取得部21によって取得された外部時刻が時刻変換部26によって変換されて得られた固有時刻を内部時計14に設定する機能である。変換後取得部221は、内部時計設定部22と時刻変換部26との間で時刻を受け渡す機能である。時刻管理部23は、内部時計14を管理する機能である。
 内部時計参照部24は、内部時計14を参照し、内部時計が示す時刻である内部時刻が時刻逆変換部27によって変換されて得られた参照時刻を取得する機能である。逆変換後取得部241は、内部時計参照部24と時刻逆変換部27との間で時刻を受け渡す機能である。時刻使用部25は、内部時計参照部24によって取得された参照時刻を使用する機能である。
 時刻変換部26は、時刻を変換時間だけずらす変換を行う機能である。時刻逆変換部27は、時刻変換部26とは逆方向に、時刻を変換時間だけずらす逆変換を行う機能である。
 ***動作の説明***
 図4から図7を参照して、実施の形態1に係る時刻同期装置10の動作を説明する。
 実施の形態1に係る時刻同期装置10の動作手順は、実施の形態1に係る時刻同期方法に相当する。また、実施の形態1に係る時刻同期装置10の動作を実現するプログラムは、実施の形態1に係る時刻同期プログラムに相当する。
 図4を参照して、実施の形態1に係る時刻同期装置10が内部時計14の時刻を外部時計51の時刻と同期させる処理を説明する。
 (ステップS11:時刻取得処理)
 時刻取得部21は、NIC13を介して、時刻配信装置50から外部時計51の外部時刻を取得する。時刻取得部21は、取得された外部時刻をメインメモリ15に書き込む。
 (ステップS12:時刻変換処理)
 内部時計設定部22は、変換後取得部221を介して、ステップS11で取得された外部時刻を時刻変換部26に送信して、外部時刻を内部時計14の管理範囲内の時刻である固有時刻に変換させる。
 (ステップS13:内部時計設定処理)
 内部時計設定部22は、ステップS12で変換されて得られた固有時刻を時刻管理部23に受け渡すことにより、固有時刻を内部時計14に設定する。
 一定時間経過後に、処理が再びステップS11に戻される。これにより、一定時間経過後に再び内部時計14の時刻が外部時計51の時刻と同期される。
 図5を参照して、実施の形態1に係る時刻変換処理(図4のステップS12)を説明する。
 (ステップS21:時刻送信処理)
 内部時計設定部22は、ステップS11で取得された外部時刻をメインメモリ15から読み出す。内部時計設定部22は、変換後取得部221を介して、外部時刻を時刻変換部26に送信する。時刻変換部26は、送信された外部時刻を取得する。
 (ステップS22:変換処理)
 時刻変換部26は、ステップS21で取得された外部時刻に、変換時間を加算することにより、外部時刻を固有時刻に変換する。変換時間は、時刻を未来に進める場合は正の時間であり、時刻を過去に戻す場合は負の時間である。
 (ステップS23:時刻返却処理)
 時刻変換部26は、ステップS22で変換されて得られた固有時刻を変換後取得部221に送信する。内部時計設定部22は、変換後取得部221を介して、送信された固有時刻を取得する。
 図6を参照して、実施の形態1に係る時刻同期装置10が内部時計14の時刻を使用する処理を説明する。
 (ステップS31:時刻読出処理)
 内部時計参照部24は、時刻管理部23に要求することにより、内部時計14が示す時刻である内部時刻を読み出す。内部時計参照部24は、読み出された内部時刻をメインメモリ15に書き込む。
 (ステップS32:時刻逆変換処理)
 内部時計参照部24は、逆変換後取得部241を介して、ステップS31で読み出された内部時刻を時刻逆変換部27に送信して、外部時刻を固有時刻に変換した処理の逆の処理を行うことにより、内部時刻を参照時刻に変換させる。
 (ステップS33:時刻使用処理)
 時刻使用部25は、ステップS32で変換されて得られた参照時刻を用いて処理を行う。これにより、時刻使用部25は、内部時計14が示す内部時刻ではなく、内部時刻が変換されて得られた参照時刻を用いて処理を行うことになる。
 図7を参照して、実施の形態1に係る時刻逆変換処理(図6のステップS32)を説明する。
 (ステップS41:時刻送信処理)
 内部時計参照部24は、ステップS31で読み出された内部時刻をメインメモリ15から読み出す。内部時計参照部24は、逆変換後取得部241を介して、内部時刻を時刻逆変換部27に送信する。時刻逆変換部27は、送信された内部時刻を取得する。
 (ステップS42:逆変換処理)
 時刻逆変換部27は、ステップS41で取得された内部時刻から、変換時間を減算することにより、内部時刻を参照時刻に変換する。
 (ステップS43:時刻返却処理)
 時刻逆変換部27は、ステップS42で変換されて得られた参照時刻を逆変換後取得部241に送信する。内部時計参照部24は、逆変換後取得部241を介して、送信された参照時刻を取得する。
 ***実施の形態1の効果***
 以上のように、実施の形態1に係る時刻同期装置10は、外部時刻を内部時計の管理範囲内の時刻である固有時刻に変換させた上で、内部時計14に設定する。これにより、内部時計に管理範囲外の時刻が設定されることがなく、適切に時刻を同期可能になる。
 また、実施の形態1に係る時刻同期装置10は、内部時計14が示す時刻である内部時刻を、外部時刻を固有時刻に変換した処理の逆の処理を行うことにより、参照時刻に変換した上で使用する。これにより、外部時刻と同期した時刻を用いて処理を行うことができる。
 図8を参照して、実施の形態1に係る時刻同期装置10の効果を説明する。
 図8では、時刻同期装置10が外部時計51と時刻同期を行っている場合における、外部時計51の外部時刻と内部時計14の内部時刻との関係が示されている。図8では、内部時刻が外部時刻より変換時間だけ過去になるように変換が行われている。そして、内部時計14は、外部時計51に同期しつつ、外部時計51の外部時刻と一定時間(変換時間)の間隔を保ちながら動作する。
 これにより、時刻同期装置10が管理可能な時刻に制約がある場合でも、時刻を時刻同期装置10が管理可能な範囲に設定でき、装置が正しい動作を継続することができる。
 ***他の構成***
 <変形例1>
 実施の形態1では、各機能構成要素がソフトウェアで実現された。しかし、変形例1として、各機能構成要素はハードウェアで実現されてもよい。この変形例1について、実施の形態1と異なる点を説明する。
 各機能構成要素がハードウェアで実現される場合には、時刻同期装置10は、プロセッサ12とメインメモリ15とに代えて、電子回路を備える。電子回路は、各機能構成要素と、メインメモリ15との機能とを実現する専用の回路である。
 電子回路としては、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ロジックIC、GA(Gate Array)、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)が想定される。
 各機能構成要素を1つの電子回路で実現してもよいし、各機能構成要素を複数の電子回路に分散させて実現してもよい。
 <変形例2>
 変形例2として、一部の各機能構成要素がハードウェアで実現され、他の各機能構成要素がソフトウェアで実現されてもよい。
 実施の形態2.
 実施の形態2では、実施の形態1で説明した時刻同期装置10の動作の具体例を説明する。実施の形態2では、時刻同期装置10が管理可能な時刻の範囲である管理範囲に制限がある場合の例として、2038年問題を用いる。
 2038年問題は、32bit版のLinux(登録商標)において2038年を迎えると時刻管理変数がオーバフローしてしまう問題である。Linux(登録商標)は、UNIX(登録商標)時刻をシステム内部時計に持つことで時刻を管理している。以下、UNIX(登録商標)時刻をUN時刻と呼ぶ。UN時刻は、1970年1月1日午前0時を基準年とし、基準年からの経過秒数で表される時刻である。システム内部時計は符号付き整数型で定義されているため、32bit版のLinux(登録商標)の場合は2038年1月19日3時14分7秒を過ぎると時刻管理変数がオーバフローしてしまう。
 ***構成の説明***
 時刻同期装置10のハードウェア構成は、図1に示す実施の形態1に係る時刻同期装置10のハードウェア構成と同じである。
 ここでは、プロセッサ12は、32ビットのプロセッサである。また、時刻配信装置50は、NTP(Network Time Protocol)サーバ、又は、GPS(Global Positioning System)衛星といった、Linux(登録商標)システムが受信可能な時刻情報を配信する装置である。実施の形態2では、時刻配信装置50は、NTPサーバとして説明する。
 時刻同期装置10の機能構成は、図2に示す実施の形態1に係る時刻同期装置10の機能構成と同じである。
 ここでは、時刻取得部21と内部時計設定部22と時刻変換部26とは、NTPクライアントによって実現される。時刻管理部23は、Linux(登録商標)のKernelによって実現される。内部時計設定部22は、NTPサーバから取得された外部時刻であるNTP時刻を固有時刻に変換した上で、UN時刻を計算して、内部時計14に設定する。
 ***動作の説明***
 図9から図13を参照して、実施の形態2に係る時刻同期装置10の動作を説明する。
 実施の形態2に係る時刻同期装置10の動作手順は、実施の形態2に係る時刻同期方法に相当する。また、実施の形態2に係る時刻同期装置10の動作を実現するプログラムは、実施の形態2に係る時刻同期プログラムに相当する。
 実施の形態2における以下の説明では、NTPサーバから取得される外部時刻を外部NTP時刻と呼ぶ。外部NTP時刻が変換された固有時刻を固有NTP時刻と呼ぶ。外部NTP時刻が変換されたUN時刻を外部UN時刻と呼ぶ。固有NTP時刻が変換されたUN時刻を固有UN時刻と呼ぶ。
 図9及び図10を参照して、実施の形態2に係る時刻変換処理(図4のステップS12)を説明する。
 (ステップS51:時刻送信処理)
 内部時計設定部22は、ステップS11で取得された外部時刻である外部NTP時刻をメインメモリ15から読み出す。内部時計設定部22は、変換後取得部221を介して、外部NTP時刻を時刻変換部26に送信する。時刻変換部26は、送信された外部NTP時刻を取得する。
 (ステップS52:固有変換処理)
 時刻変換部26は、ステップS51で取得された外部NTP時刻に、変換時間を加算することにより、外部NTP時刻を固有NTP時刻に変換する。具体的には、時刻変換部26は、変換時間を加算することにより、外部NTP時刻を内部時計14の管理範囲内の時刻である固有NTP時刻に変換する。
 この際、時刻変換部26は、固有NTP時刻が管理範囲内のうちできるだけ早い時刻になるように変換時間を設定する。これにより、変換時間を変更することなく、管理範囲内で時刻を管理できる期間を長くすることが可能になる。ここでは、時刻変換部26は、固有NTP時刻がUN時刻の基準年である1970年1月1日午前0時にできるだけ近い時刻になるように、変換時間を設定する。
 また、この際、時刻変換部26は、外部時刻の時刻系によらない定期的な時刻の変動である定期変動の回数が同じになるように変換時間を設定する。ここでは、定期変動は、閏年である。閏年は、原則として4年に1度訪れる。したがって、図11に示すように、時刻変換部26は、4年及び40年といった4の倍数の年数を変換時間に設定する。例えば、変換時間が-40年の場合には、変換時間は、-40年(UTC)=-(60秒×60分×24時間×(365日×30年+366日×10年))=-1,262,304,000秒になる。これにより、変換時間をその都度計算し直す必要がなくなる。一方、変換時間を2年といった時間にしてしまうと、閏年を含む場合と含まない場合とが発生してしまい、外部NTP時刻に応じて変換時間を計算し直さなければならない。
 なお、西暦年が100で割り切れる年は閏年にならず、西暦年が400で割り切れる年は閏年になる。そこで、時刻変換部26は、必要に応じてこの規則も考慮して変換時間を設定してもよい。
 (ステップS53:UN変換処理)
 時刻変換部26は、ステップS52で変換されて得られた固有NTP時刻を固有UN時刻に変換する。
 図12に示すように、NTP時刻とUN時刻とは、基準年は異なる。しかし、NTP時刻とUN時刻とは、いずれも閏秒を考慮するUTC(協定世界時)を時刻系として用いている。したがって、NTP時刻をUN時刻に変換する場合には、基準年の違いによる固定の時間を加算すればよい。
 (ステップS54:時刻返却処理)
 時刻変換部26は、ステップS53で変換されて得られた固有UN時刻を変換後取得部221に送信する。内部時計設定部22は、変換後取得部221を介して、送信された固有UN時刻を取得する。
 これにより、図4のステップS13で、固有UN時刻が内部時計14に設定される。
 図13を参照して、実施の形態2に係る時刻逆変換処理(図6のステップS32)を説明する。
 (ステップS61:時刻送信処理)
 内部時計参照部24は、ステップS31で取得された内部時計14が示す時刻である内部UN時刻をメインメモリ15から読み出す。内部時計参照部24は、逆変換後取得部241を介して、内部UN時刻を時刻逆変換部27に送信する。時刻逆変換部27は、送信された内部UN時刻を取得する。
 (ステップS62:逆変換処理)
 時刻逆変換部27は、ステップS61で取得された内部UN時刻から、変換時間を減算することにより、内部UN時刻を参照UN時刻に変換する。例えば、変換時間が40年の場合には、時刻逆変換部27は、内部UN時刻から-1,262,304,000秒を減算する。
 (ステップS63:時刻返却処理)
 時刻逆変換部27は、ステップS62で変換されて得られた参照UN時刻を逆変換後取得部241に送信する。内部時計参照部24は、逆変換後取得部241を介して、送信された参照UN時刻を取得する。
 これにより、図6のステップS33で、内部UN時刻が変換時間分ずらされた参照UN時刻が使用される。
 なお、ここでは、時刻使用部25は、UN時刻を用いるものとして説明した。しかし、時刻使用部25がNTP時刻を用いる場合には、参照UN時刻に、さらにNTP時刻とUN時刻との基準年の違いによる固定の時間を減算する必要がある。
 ***実施の形態2の効果***
 以上のように、実施の形態2に係る時刻同期装置10は、外部NTP時刻を固有NTP時刻に変換した上で、固有UN時刻に変換する。これにより、図14に示すように、32bit版のLinux(登録商標)において、外部時刻が2038年を越えて管理不可な時刻の範囲に入った場合であっても、内部時計14の時刻を管理範囲内の時刻として動作させることが可能である。
 なお、図10に示すように、変換時間による変換を行わない場合には、外部NTP時刻が外部UN時刻に変換される。そのため、外部時刻が2038年を越えて管理不可な時刻の範囲に入った場合には、内部時計14の時刻が管理不可な時刻になってしまう。
 実施の形態3.
 実施の形態3は、NTPサーバに代えて、PTP(Precision Time Protocol)マスタを時刻配信装置50として用いる点が実施の形態2と異なる。実施の形態3では、この異なる点を説明し、同一の点については説明を省略する。
 ***構成の説明***
 時刻同期装置10のハードウェア構成は、図1に示す実施の形態1に係る時刻同期装置10のハードウェア構成と同じである。ここでは、時刻配信装置50は、PTPマスタである。
 時刻同期装置10の機能構成は、図2に示す実施の形態1に係る時刻同期装置10の機能構成と同じである。
 ここでは、時刻取得部21と内部時計設定部22と時刻変換部26とは、PTPスレーブによって実現される。時刻管理部23は、Linux(登録商標)のKernelによって実現される。内部時計設定部22は、PTPマスタから取得された外部時刻であるPTP時刻を固有時刻に変換した上で、UN時刻を計算して、内部時計14に設定する。
 ***動作の説明***
 図15から図17を参照して、実施の形態3に係る時刻同期装置10の動作を説明する。
 実施の形態3に係る時刻同期装置10の動作手順は、実施の形態3に係る時刻同期方法に相当する。また、実施の形態3に係る時刻同期装置10の動作を実現するプログラムは、実施の形態3に係る時刻同期プログラムに相当する。
 実施の形態3における以下の説明では、PTPマスタから取得される外部時刻を外部PTP時刻と呼ぶ。外部PTP時刻が変換されたUN時刻を外部UN時刻と呼ぶ。外部UN時刻が変換されたUN時刻を固有UN時刻と呼ぶ。
 図15及び図16を参照して、実施の形態3に係る時刻同期装置10が内部時計14の時刻をPTPマスタの外部PTP時刻と同期させる処理を説明する。
 以下で説明するように、外部PTP時刻をNIC時計に設定する処理と、NIC時計が示す外部PTP時刻をUN時刻に変換して内部時計14に設定する処理とが並行して動作する。
 (ステップS71:時刻取得処理)
 時刻取得部21は、時刻配信装置50であるPTPマスタから外部PTP時刻を取得する。時刻取得部21は、取得された外部PTP時刻をメインメモリ15に書き込む。
 (ステップS72:NIC設定処理)
 内部時計設定部22は、ステップS71で取得された外部PTP時刻をNIC13に内蔵されたNIC時計に設定する。
 (ステップS73:時刻変換処理)
 内部時計設定部22は、NIC時計が示す外部PTP時刻を読み出す。内部時計設定部22は、変換後取得部221を介して、読み出された外部PTP時刻を時刻変換部26に送信して、外部PTP時刻を内部時計14の管理範囲内の時刻である固有UN時刻に変換させる。
 (ステップS74:内部時計設定処理)
 内部時計設定部22は、ステップS73で変換されて得られた固有UN時刻を時刻管理部23に受け渡すことにより、固有UN時刻を内部時計14に設定する。
 図16及び図17を参照して、実施の形態3に係る時刻変換処理(図15のステップS73)を説明する。
 (ステップS81:時刻送信処理)
 内部時計設定部22は、NIC時計が示す外部PTP時刻を読み出す。内部時計設定部22は、変換後取得部221を介して、外部PTP時刻を時刻変換部26に送信する。時刻変換部26は、送信された外部PTP時刻を取得する。
 (ステップS82:UN変換処理)
 時刻変換部26は、ステップS81で取得された外部PTP時刻を外部UN時刻に変換する。
 図18に示すように、PTPマスタで用いられるPTP時刻は、閏秒を考慮しないTAI(国際原子時)を時刻系として用いている。これに対して、UN時刻は、閏秒を考慮するUTCを時刻系として用いている。そのため、PTP時刻をUN時刻に変換する場合には、閏秒を考慮して変換を行う必要がある。但し、閏秒は、閏年と異なり不定期に発生する。
 ここで、TAIとUTCとのずれは、UtcOffsetとして定義されている。このUtcOffsetは、時刻同期装置10の外部のサーバで管理されている。そこで、時刻変換部26は、外部のサーバからUtcOffsetを取得し、外部PTP時刻からUtcOffsetを差し引くことにより、外部PTP時刻を外部UN時刻に変換する。
 (ステップS83:固有変換処理)
 時刻変換部26は、ステップS82で変換されて得られた外部UN時刻に、変換時間を加算することにより、外部UN時刻を固有UN時刻に変換する。具体的には、時刻変換部26は、変換時間を加算することにより、外部UN時刻を内部時計14の管理範囲内の時刻である固有UN時刻に変換する。
 (ステップS84:時刻返却処理)
 時刻変換部26は、ステップS83で変換されて得られた固有UN時刻を変換後取得部221に送信する。内部時計設定部22は、変換後取得部221を介して、送信された固有UN時刻を取得する。
 これにより、図15のステップS74で、固有UN時刻が内部時計14に設定される。
 つまり、固有時刻と外部時刻との間に不定期な時刻の変動である不定期変動が発生する場合がある。ここでは、不定期変動は、閏秒である。このように、不定期変動が発生する場合には、時刻変換部26は、不定期変動により変動する時間を特定し、特定された時間分、外部時刻を変換して固有時刻が計算される。
 実施の形態3に係る時刻逆変換処理は、図13を参照して説明した実施の形態2に係る時刻逆変換処理と同じである。
 ***実施の形態3の効果***
 以上のように、実施の形態3に係る時刻同期装置10は、時刻同期装置10で用いられる時刻系と、時刻配信装置50で用いられる時刻系との間で、閏秒のように不定期変動が発生する場合であっても、適切な変換が可能である。
 10 時刻同期装置、11 クロック発信機、12 プロセッサ、13 NIC、14 内部時計、15 メインメモリ、16 ペリフェラル、21 時刻取得部、22 内部時計設定部、221 変換後取得部、23 時刻管理部、24 内部時計参照部、241 逆変換後取得部、25 時刻使用部、26 時刻変換部、27 時刻逆変換部、40 時刻変換装置、50 時刻配信装置、51 外部時計、61 伝送路、62 伝送路。

Claims (8)

  1.  外部時計の時刻である外部時刻を取得する時刻取得部と、
     前記時刻取得部によって取得された前記外部時刻を時刻変換装置に送信して、前記外部時刻を内部時計の管理範囲内の時刻である固有時刻に変換させ、前記固有時刻を前記内部時計に設定する内部時計設定部と
    を備える時刻同期装置。
  2.  前記時刻同期装置は、さらに、
     前記内部時計が示す時刻である内部時刻を前記時刻変換装置に送信して、前記外部時刻を前記固有時刻に変換した処理の逆の処理を行うことにより、前記内部時刻を参照時刻に変換させる内部時計参照部
    を備える請求項1に記載の時刻同期装置。
  3.  前記固有時刻は、前記外部時刻に変換時間が加算された時刻であり、
     前記参照時刻は、前記内部時刻から前記変換時間が減算された時刻である
    請求項2に記載の時刻同期装置。
  4.  前記変換時間は、前記固有時刻が前記管理範囲内のうちできるだけ早い時刻になるように設定される
    請求項3に記載の時刻同期装置。
  5.  前記変換時間は、前記外部時刻の時刻系によらない定期的な時刻の変動である定期変動の回数が同じになるように設定される
    請求項3又は4に記載の時刻同期装置。
  6.  前記固有時刻は、前記外部時刻との間に不定期な時刻の変動である不定期変動が発生する場合には、前記不定期変動により変動する時間分、前記外部時刻が変換されて得られる
    請求項3から5までのいずれか1項に記載の時刻同期装置。
  7.  時刻取得部が、外部時計の時刻である外部時刻を取得し、
     内部時計設定部が、前記外部時刻を時刻変換装置に送信して、前記外部時刻を内部時計の管理範囲内の時刻である固有時刻に変換させ、前記固有時刻を前記内部時計に設定する時刻同期方法。
  8.  外部時計の時刻である外部時刻を取得する時刻取得処理と、
     前記時刻取得処理によって取得された前記外部時刻を時刻変換装置に送信して、前記外部時刻を内部時計の管理範囲内の時刻である固有時刻に変換させ、前記固有時刻を前記内部時計に設定する内部時計設定処理と
    を行う時刻同期装置としてコンピュータを機能させる時刻同期プログラム。
PCT/JP2019/029049 2019-07-24 2019-07-24 時刻同期装置、時刻同期方法及び時刻同期プログラム WO2021014614A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/JP2019/029049 WO2021014614A1 (ja) 2019-07-24 2019-07-24 時刻同期装置、時刻同期方法及び時刻同期プログラム
JP2019571557A JP6682055B1 (ja) 2019-07-24 2019-07-24 時刻同期装置、時刻同期方法及び時刻同期プログラム
GB2115864.7A GB2599022B (en) 2019-07-24 2019-07-24 Time synchronization device, time synchronization method, and time synchronization program
KR1020227001043A KR102388889B1 (ko) 2019-07-24 2019-07-24 시각 동기 장치, 시각 동기 방법 및 기록 매체에 저장된 시각 동기 프로그램

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/029049 WO2021014614A1 (ja) 2019-07-24 2019-07-24 時刻同期装置、時刻同期方法及び時刻同期プログラム

Publications (1)

Publication Number Publication Date
WO2021014614A1 true WO2021014614A1 (ja) 2021-01-28

Family

ID=70166540

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/029049 WO2021014614A1 (ja) 2019-07-24 2019-07-24 時刻同期装置、時刻同期方法及び時刻同期プログラム

Country Status (4)

Country Link
JP (1) JP6682055B1 (ja)
KR (1) KR102388889B1 (ja)
GB (1) GB2599022B (ja)
WO (1) WO2021014614A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11234758A (ja) * 1998-02-19 1999-08-27 Denso Corp 移動通信端末及び移動通信システム
JP2006521604A (ja) * 2003-03-20 2006-09-21 ソニー エリクソン モバイル コミュニケーションズ, エービー Drmスキーマによる時刻制御を備えるモバイル機器
WO2007099624A1 (ja) * 2006-03-01 2007-09-07 Fujitsu Limited コンピュータシステムの時刻管理制御方法及びコンピュータシステム
US20080091968A1 (en) * 2006-10-12 2008-04-17 Samsung Electronics Co.; Ltd Clock operation method and module for mobile terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0178666B1 (ko) 1996-12-11 1999-04-01 현대자동차 주식회사 연료 주입시의 증발가스 제어장치 및 방법
KR100902601B1 (ko) * 2007-05-17 2009-06-12 한양네비콤주식회사 무선 시각송수신시스템 및 무선 시각동기방법
KR101034045B1 (ko) * 2008-06-11 2011-05-11 한국표준과학연구원 Cdma rf신호를 이용한 표준시각 동기화장치 및 그제어방법
WO2017179608A1 (ja) * 2016-04-14 2017-10-19 日本電信電話株式会社 時刻同期方法、センサ収容端末、およびセンサネットワークシステム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11234758A (ja) * 1998-02-19 1999-08-27 Denso Corp 移動通信端末及び移動通信システム
JP2006521604A (ja) * 2003-03-20 2006-09-21 ソニー エリクソン モバイル コミュニケーションズ, エービー Drmスキーマによる時刻制御を備えるモバイル機器
WO2007099624A1 (ja) * 2006-03-01 2007-09-07 Fujitsu Limited コンピュータシステムの時刻管理制御方法及びコンピュータシステム
US20080091968A1 (en) * 2006-10-12 2008-04-17 Samsung Electronics Co.; Ltd Clock operation method and module for mobile terminal

Also Published As

Publication number Publication date
KR102388889B1 (ko) 2022-04-20
JPWO2021014614A1 (ja) 2021-09-13
GB2599022B (en) 2022-09-14
KR20220011787A (ko) 2022-01-28
GB2599022A (en) 2022-03-23
JP6682055B1 (ja) 2020-04-15

Similar Documents

Publication Publication Date Title
JP5378601B2 (ja) 高精度な同期方法およびシステム
US9053106B2 (en) Time monitor
Eidson Measurement, control, and communication using IEEE 1588
US9544374B2 (en) Relative timestamp when real time clock is unavailable
US20180254841A1 (en) Transaction Management in Distributed Ledger Systems
US20070016626A1 (en) Ranging scalable time stamp data synchronization
US20130215910A1 (en) Transmission apparatus, transmission method, program, and communication system
US9928193B2 (en) Distributed timer subsystem
WO2021014614A1 (ja) 時刻同期装置、時刻同期方法及び時刻同期プログラム
AU2015339238B2 (en) Systems and methods for syncing a host computer with a variety of external devices
JP2021071297A (ja) 時刻同期システム、時刻同期回路、及び時刻同期方法
JP2003207586A (ja) 電子機器、及び、その内部時刻情報制御方法
CN116131984A (zh) 一种参考时间确定方法、装置、电子设备及存储介质
CN115987477A (zh) 一种多参考源时间同步方法及系统及模块及介质
Okabe et al. Avoiding year 2038 problem on 32-bit linux by rewinding time on clock synchronization
CN114296511A (zh) 实时时钟校准电路、方法及芯片结构
JP2015231172A (ja) ファイル作成時刻修正装置
US11956343B2 (en) High resolution signal reception
JP2004054815A (ja) 情報処理装置の時刻同期化装置
CN112019288B (zh) 时间同步方法、业务单板及网络设备
CN112953673B (zh) 频标信号远程恢复方法、装置和频标信号远程传输方法
JP2018138898A (ja) 情報管理システム、時刻情報補正方法及び時刻情報補正プログラム
Yodaiken Clock Synchronization In Finance And Beyond
Wysor et al. Low Cost Time Synchronization for Remote Measurement Systems
Burnicki Aspects of Time Distribution

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019571557

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19938901

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 202115864

Country of ref document: GB

Kind code of ref document: A

Free format text: PCT FILING DATE = 20190724

ENP Entry into the national phase

Ref document number: 20227001043

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19938901

Country of ref document: EP

Kind code of ref document: A1