JP6869058B2 - Time output device and time output method - Google Patents

Time output device and time output method Download PDF

Info

Publication number
JP6869058B2
JP6869058B2 JP2017048110A JP2017048110A JP6869058B2 JP 6869058 B2 JP6869058 B2 JP 6869058B2 JP 2017048110 A JP2017048110 A JP 2017048110A JP 2017048110 A JP2017048110 A JP 2017048110A JP 6869058 B2 JP6869058 B2 JP 6869058B2
Authority
JP
Japan
Prior art keywords
time
unit
measured
difference
rtc
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2017048110A
Other languages
Japanese (ja)
Other versions
JP2018151274A (en
Inventor
哲也 岩本
哲也 岩本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Solutions Inc.
Original Assignee
Seiko Solutions Inc.
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 Seiko Solutions Inc. filed Critical Seiko Solutions Inc.
Priority to JP2017048110A priority Critical patent/JP6869058B2/en
Publication of JP2018151274A publication Critical patent/JP2018151274A/en
Application granted granted Critical
Publication of JP6869058B2 publication Critical patent/JP6869058B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electric Clocks (AREA)

Description

本発明は、時刻出力装置、および時刻出力方法に関する。 The present invention relates to a time output device and a time output method.

近年、日本標準時を取得して、取得した標準時刻を元に時刻を打刻して、打刻した時刻をネットワーク上の機器に高精度に配信するタイムサーバーが用いられている。このようなタイムサーバーでは、例えば電話回線による時刻供給システム等の時刻源から配信された時刻情報を、高精度、高分解能なシステムクロックで打刻し、所定のタイミングで、補助用の時計であるRTC(Real Time Clock)に書き込む。そして、例えばメンテナンスの際にタイムサーバーの電源がオフ状態にされたとき、システムクロックは消滅するため、次に電源がオン状態になったとき、RTCからの時刻情報をシステムクロックに対して読み込む。 In recent years, a time server that acquires Japan Standard Time, stamps the time based on the acquired standard time, and distributes the stamped time to devices on the network with high accuracy has been used. In such a time server, time information distributed from a time source such as a time supply system by a telephone line is stamped with a high-precision, high-resolution system clock, and an auxiliary clock is used at a predetermined timing. Write to RTC (Real Time Clock). Then, for example, when the power of the time server is turned off during maintenance, the system clock is extinguished. Therefore, when the power is turned on next time, the time information from the RTC is read into the system clock.

このように時刻を保持する装置では、時刻情報を秒以上の時刻情報と秒未満の時刻情報とに分け、秒以上の時刻情報に、時計の特性に応じた第1の時間を加える。そして、時刻を保持する装置では、クロック発生器の周期時間毎に、該周期時間を秒未満の時刻情報に加算し、秒未満の時刻情報が秒以上に桁上がりしたか否かを判断する。そして、時刻を保持する装置では、秒未満の時刻情報の桁上がりをトリガーに、第1の時間が加えられた秒以上の時刻情報を、時計に設定する。これにより、時刻を保持する装置は、第1の時間でRTCの特性を吸収でき、秒未満の精度で前記時計の時刻を合わせることができ、秒未満の桁を有しない時計であっても秒未満の精度で時刻を設定することができる(例えば特許文献1参照)。 In the device that holds the time in this way, the time information is divided into time information of seconds or more and time information of less than seconds, and a first time according to the characteristics of the timepiece is added to the time information of seconds or more. Then, in the device that holds the time, for each cycle time of the clock generator, the cycle time is added to the time information of less than a second, and it is determined whether or not the time information of less than a second is carried by a second or more. Then, in the device that holds the time, the time information of the second or more to which the first time is added is set in the clock, triggered by the carry of the time information of less than a second. As a result, the device that holds the time can absorb the characteristics of the RTC in the first time, can set the time of the clock with an accuracy of less than seconds, and even a clock having no digits less than seconds can be in seconds. The time can be set with an accuracy less than (see, for example, Patent Document 1).

特開2004−340672号公報Japanese Unexamined Patent Publication No. 2004-340672

特許文献1に記載の技術を使用すると、再起動後のタイムサーバーは、起動直後からほぼ正確な時刻を保持し、再起動後すぐに時刻配信をすることも可能となる。
しかしならが、特許文献1に記載の技術では、タイムサーバーの電源をオフする前に、秒未満の時刻情報が桁上がりをするタイミングを計測し、そのタイミングを見計らってRTCに秒以上の時刻情報を設定する。このため、特許文献1に記載の技術では、タイムサーバーの電源をすぐにはオフできず、また、オフするまでに、秒未満での高精度な処理も必要となっていた。
By using the technique described in Patent Document 1, the time server after restarting can hold a substantially accurate time immediately after restarting, and can deliver the time immediately after restarting.
However, in the technique described in Patent Document 1, before turning off the power of the time server, the timing at which the time information of less than a second carries is measured, and the time information of the time of seconds or more is sent to the RTC at that timing. To set. Therefore, in the technique described in Patent Document 1, the power of the time server cannot be turned off immediately, and high-precision processing in less than a second is required before turning off the power.

本発明は、上記の問題点に鑑みてなされたものであって、再起動の直後であっても信頼のある時刻情報を、簡素な仕組みで出力することができる時刻出力装置、および時刻出力方法を提供することを目的とする。 The present invention has been made in view of the above problems, and is a time output device and a time output method capable of outputting reliable time information by a simple mechanism even immediately after a restart. The purpose is to provide.

上記目的を達成するため、本発明の一態様に係る時刻出力装置(タイムサーバー2)は、時刻を計時する第1計時部(時刻取得部22、発振回路23)と、時刻を計時し、所定時刻毎に割り込み信号を出力し、電源がオフ状態の間も計時を継続する第2計時部(RTC25、補助電源26)と、前記割り込み信号が出力されたとき、前記第1計時部が計時した時刻と、前記第2計時部が計時した時刻との時差を第1時差として算出して保持する時差算出部(214)と、自装置が再起動され、前記割り込み信号が出力されたとき、前記第2計時部が計時した時刻に前記第1時差を加算して補正した時刻を前記第1計時部に設定する時刻設定部(RTC設定部212)と、を備え、前記時刻設定部は、電源がオフ状態になるとき、前記第1計時部が計時した時刻を前記第2計時部に設定し、前記第2計時部は、前記第1計時部が計時した時刻が設定された後に秒を更新したとき、割り込み信号を出力する。 In order to achieve the above object, the time output device (time server 2) according to one aspect of the present invention measures the time with the first time unit (time acquisition unit 22, oscillation circuit 23) for measuring the time, and determines the time. The second timekeeping unit (RTC25, auxiliary power supply 26) that outputs an interrupt signal at each time and continues timing even while the power is off, and the first timekeeping unit clocks when the interrupt signal is output. The time difference calculation unit (214) that calculates and holds the time difference between the time and the time measured by the second time unit as the first time difference, and when the own device is restarted and the interrupt signal is output, the said The time setting unit (RTC setting unit 212) is provided with a time setting unit (RTC setting unit 212) that sets the time corrected by adding the first time difference to the time measured by the second time unit to the first time unit, and the time setting unit is a power source. When is turned off, the time measured by the first time unit is set to the second time unit, and the second time unit updates the seconds after the time measured by the first time unit is set. when, you output an interrupt signal.

また、本発明の一態様に係る時刻出力装置において、前記第1計時部は、所定のタイミングで標準時刻に設定され、前記標準時刻に基づいて第1の精度で時刻を計時し、前記第2計時部は、前記第1の精度よりも低い第2の精度で時刻を計時するようにしてもよい。 Further, in the time output device according to one aspect of the present invention, the first time unit is set to a standard time at a predetermined timing, and the time is measured with the first accuracy based on the standard time, and the second time is measured. The timekeeping unit may time the time with a second accuracy lower than the first accuracy.

また、本発明の一態様に係る時刻出力装置において、前記時刻設定部は、電源がオフ状態になるときの前記第2計時部が計時した時刻と、電源がオン状態になったときの前記第2計時部が計時した時刻との時差を第2時差として算出し、算出した前記第2時差が閾値(時差閾値)以内の場合、自装置が再起動され、前記割り込み信号が出力されたとき、前記第2計時部が計時した時刻に前記第1時差を加算して補正した時刻を前記第1計時部に設定するようにしてもよい。 Further, in the time output device according to one aspect of the present invention, the time setting unit uses the time measured by the second timekeeping unit when the power is turned off and the time when the power is turned on. 2 The time difference from the time measured by the timekeeping unit is calculated as the second time difference, and if the calculated second time difference is within the threshold (time difference threshold), the own device is restarted and the interrupt signal is output. The time corrected by adding the first time difference to the time measured by the second time unit may be set in the first time unit.

また、本発明の一態様に係る時刻出力装置において、前記閾値は、前記第2計時部が計時する時刻の誤差に基づき、前記時刻出力装置に許容される誤差以内となる時間であるようにしてもよい。 Further, in the time output device according to one aspect of the present invention, the threshold value is set to be within the error allowed by the time output device based on the time error measured by the second timekeeping unit. May be good.

上記目的を達成するため、本発明の一態様に係る時刻出力方法は、時刻を計時する第1計時部と、時刻を計時し、電源がオフ状態の間も計時を継続する第2計時部と、を有する時刻出力装置の時刻出力方法であって、第2計時部が、所定時刻毎に割り込み信号を出力するステップと、時差算出部が、前記割り込み信号が出力されたとき、前記第1計時部によって計時した時刻と、前記第2計時部によって計時した時刻との時差を第1時差として算出して保持する時差算出ステップと、時刻設定部が、自装置が再起動され、前記割り込み信号が出力されたとき、前記第2計時部によって計時した時刻に前記第1時差を加算して補正した時刻を前記第1計時部に設定するステップと、前記時刻設定部が、電源がオフ状態になるとき、前記第1計時部が計時した時刻を前記第2計時部に設定するステップと、前記第2計時部が、前記第1計時部が計時した時刻が設定された後に秒を更新したとき、割り込み信号を出力するステップと、を含む。 In order to achieve the above object, the time output method according to one aspect of the present invention includes a first time unit that measures the time and a second time unit that measures the time and continues the time even when the power is off. A time output method of a time output device having the above, wherein the second time counting unit outputs an interrupt signal at predetermined time intervals, and the time difference calculation unit outputs the interrupt signal, the first time counting unit. The time difference calculation step of calculating and holding the time difference between the time measured by the unit and the time measured by the second time unit as the first time difference, and the time setting unit restarts its own device and the interrupt signal is output. When output, the step of setting the time corrected by adding the first time difference to the time measured by the second time unit to the first time unit and the time setting unit are turned off. When the step of setting the time measured by the first time unit to the second time portion and when the second time unit updates the seconds after the time measured by the first time unit is set. Includes a step to output an interrupt signal.

本発明によれば、再起動の直後であっても信頼のある時刻情報を出力することができる。 According to the present invention, reliable time information can be output even immediately after a restart.

時刻管理システムの概略構成図である。It is a schematic block diagram of a time management system. 本実施形態に係るタイムサーバーの構成例を示すブロック図である。It is a block diagram which shows the configuration example of the time server which concerns on this embodiment. 本実施形態に係る再起動時の処理例を示すシーケンス図である。It is a sequence diagram which shows the processing example at the time of restart which concerns on this embodiment. 本実施形態に係る電源がオフ状態にされたときの処理例を示すフローチャートである。It is a flowchart which shows the processing example when the power source which concerns on this embodiment is turned off. 本実施形態に係る電源がオン状態にされたときの処理例を示すフローチャートである。It is a flowchart which shows the processing example when the power source which concerns on this Embodiment is turned on. 本実施形態に係る再起動時の処理の変形例を示すシーケンス図である。It is a sequence diagram which shows the modification of the process at the time of restart which concerns on this embodiment.

以下、本発明の実施の形態について図面を参照しながら説明する。なお、以下の例では、標準時刻として日本の標準時刻の例を説明するが、標準時刻は他国の標準時刻やGMT(Greenwich Mean Time;グリニッジ標準時)等であってもよい。なお、以下の例では、時刻出力装置の例としてタイムサーバーを例に説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following example, the standard time of Japan will be described as the standard time, but the standard time may be the standard time of another country, GMT (Greenwich Mean Time), or the like. In the following example, a time server will be described as an example of the time output device.

図1は、時刻管理システム1の概略構成図である。図1に示すように、時刻管理システム1は、タイムサーバー2(時刻出力装置)、GPS3、テレホンJJY4、長波JJY5、FM時報6、クライアント7−1、クライアント7−2、クライアント7−3、…を含んで構成される。
以下の説明において、クライアント7−1、クライアント7−2、クライアント7−3、…のうちの1つを特定しない場合は、クライアント7という。また、タイムサーバー2は、ネットワーク8を介してクライアント7と接続されている。ネットワーク8は、例えばインターネット・プロトコルを用いるネットワークである。
FIG. 1 is a schematic configuration diagram of the time management system 1. As shown in FIG. 1, the time management system 1 includes a time server 2 (time output device), GPS3, telephone JJY4, long wave JJY5, FM time signal 6, client 7-1, client 7-2, client 7-3, ... Consists of including.
In the following description, when one of client 7-1, client 7-2, client 7-3, ... Is not specified, it is referred to as client 7. Further, the time server 2 is connected to the client 7 via the network 8. Network 8 is, for example, a network that uses the Internet Protocol.

タイムサーバー2は、例えば、GPS3、テレホンJJY4、長波JJY5、FM時報6のうち少なくとも1つの時刻源から時刻を取得する。なお、時刻源はこれらに限られず、例えばNTP(Network Time Protocol)サーバー等であってもよい。タイムサーバー2は、取得した時刻を、高精度、高分解能なシステムクロックで打刻し、所定のタイミングで、補助用の時計であるRTC(Real Time Clock)に書き込む。タイムサーバー2は、電源がオフ状態にされたとき、RTCとシステムクロックとの時差を算出して記憶する。タイムサーバー2は、電源がオフ状態の間、RTCを自走させて時刻計時を継続する。タイムサーバー2は、次に電源がオン状態になったとき、RTCの時刻を取得し、取得した時刻を記憶させた時差を用いて補正する。タイムサーバー2は、オフ状態になっていた時間が所定の時間内であり精度が保たれている場合、補正した時刻をNTPによって、ネットワーク8を介してクライアントに提供する。 The time server 2 acquires the time from at least one time source of, for example, GPS3, telephone JJY4, long wave JJY5, and FM time signal 6. The time source is not limited to these, and may be, for example, an NTP (Network Time Protocol) server or the like. The time server 2 stamps the acquired time with a high-precision, high-resolution system clock, and writes it to the RTC (Real Time Clock), which is an auxiliary clock, at a predetermined timing. The time server 2 calculates and stores the time difference between the RTC and the system clock when the power is turned off. The time server 2 makes the RTC self-propelled to continue time counting while the power is off. The time server 2 acquires the RTC time the next time the power is turned on, and corrects it using the time difference in which the acquired time is stored. When the time that has been turned off is within a predetermined time and the accuracy is maintained, the time server 2 provides the corrected time to the client via the network 8 by NTP.

GPS3は、Global Positioning System(全地球測位システム)である。GPS3が送信する信号には、衛星自身の位置(軌道)や、電波を発信した時刻が含まれている。時刻の精度は、±1[ms]である。
テレホンJJY4は、電話回線による時刻供給システムである。時刻の精度は、±10[ms]である。
GPS3 is a Global Positioning System (Global Positioning System). The signal transmitted by the GPS 3 includes the position (orbit) of the satellite itself and the time when the radio wave is transmitted. The accuracy of the time is ± 1 [ms].
The telephone JJY4 is a time supply system using a telephone line. The accuracy of the time is ± 10 [ms].

長波JJY5は、30−300kHzの周波数帯で放送されている長波JJYの電波、いわゆる電波時計の電波に含まれる時報である。時刻の精度は、±100[ms]である。
FM時報6は、FM周波数帯域で放送されている日本放送協会(NHK)の時報である。なお、NHKの時報は、0.1秒継続する440Hzの予報音を1秒間隔で3回送信し、その1秒後に1秒継続し減衰する880Hzの正報音を送信するという構成となっている。時刻の精度は、±100[ms]である。
The long wave JJY5 is a time signal included in the radio wave of the long wave JJY broadcast in the frequency band of 30 to 300 kHz, that is, the radio wave of the so-called radio clock. The accuracy of the time is ± 100 [ms].
FM time signal 6 is a time signal of the Japan Broadcasting Corporation (NHK) broadcast in the FM frequency band. The NHK time signal is configured to transmit a 440 Hz forecast sound that lasts for 0.1 seconds three times at 1-second intervals, and then transmits an 880 Hz positive sound that continues for 1 second and attenuates 1 second later. There is. The accuracy of the time is ± 100 [ms].

クライアント7は、例えば、サーバー、パーソナルコンピュータである。クライアント7は、タイムサーバー2から提供される時刻を取得して、現在時刻を調整する。 The client 7 is, for example, a server or a personal computer. The client 7 acquires the time provided by the time server 2 and adjusts the current time.

次に、タイムサーバー2の構成例を説明する。
図2は、本実施形態に係るタイムサーバー2の構成例を示すブロック図である。図2に示すように、タイムサーバー2は、制御部21、時刻取得部22(第1計時部)、発振回路23(第1計時部)、RTC25(第2計時部)、補助電源26(第2計時部)、記憶部27、および通信部28を備えている。制御部21は、計時部211、RTC設定部212(時刻設定部)、検出部213、および時差算出部214を備えている。
Next, a configuration example of the time server 2 will be described.
FIG. 2 is a block diagram showing a configuration example of the time server 2 according to the present embodiment. As shown in FIG. 2, the time server 2 includes a control unit 21, a time acquisition unit 22 (first timekeeping unit), an oscillation circuit 23 (first timekeeping unit), an RTC25 (second timekeeping unit), and an auxiliary power supply 26 (second timekeeping unit). 2 timekeeping unit), a storage unit 27, and a communication unit 28. The control unit 21 includes a time measuring unit 211, an RTC setting unit 212 (time setting unit), a detection unit 213, and a time difference calculation unit 214.

制御部21は、時刻取得部22が取得した時刻に合わせて、発振回路23が生成した第1の周波数でシステムクロックを計時する。制御部21は、システムクロックの時刻を、通信部28を制御してクライアント7へ提供する。制御部21は、タイムサーバー2の電源がオフ状態にされたとき、システムクロックとRTC25との時差を記憶部27に記憶させる。制御部21は、再起動時、RTC25の時刻を記憶部27に記憶させた時差を用いて補正する。制御部21は、補正した時刻を、通信部28を制御してクライアント7へ提供する。制御部21は、再起動後、時刻取得部22が時刻情報を取得できたとき、システムクロックを時刻取得部22が取得した時刻に合わせる。 The control unit 21 clocks the system clock at the first frequency generated by the oscillation circuit 23 in accordance with the time acquired by the time acquisition unit 22. The control unit 21 controls the communication unit 28 to provide the time of the system clock to the client 7. The control unit 21 stores the time difference between the system clock and the RTC 25 in the storage unit 27 when the power of the time server 2 is turned off. When restarting, the control unit 21 corrects the time of the RTC 25 by using the time difference stored in the storage unit 27. The control unit 21 controls the communication unit 28 to provide the corrected time to the client 7. After restarting, the control unit 21 adjusts the system clock to the time acquired by the time acquisition unit 22 when the time acquisition unit 22 can acquire the time information.

計時部211は、制御部21が出力した第1の周波数を用いてシステムクロックの計時を行う。計時部211は、時刻取得部22が出力した時刻情報を用いてシステムクロックを合わせる。計時部211は、再起動後、RTC設定部212から出力された時刻にシステムクロックを合わせる。計時部211は、このように合わせたシステムクロックを、時刻取得部22が時刻情報を出力するまで使用する。なお、システムクロックの時刻の精度は、例えば0.1ppmである。 The timekeeping unit 211 clocks the system clock using the first frequency output by the control unit 21. The timekeeping unit 211 adjusts the system clock using the time information output by the time acquisition unit 22. After restarting, the timekeeping unit 211 adjusts the system clock to the time output from the RTC setting unit 212. The timekeeping unit 211 uses the system clock thus adjusted until the time acquisition unit 22 outputs the time information. The accuracy of the system clock time is, for example, 0.1 ppm.

RTC設定部212は、所定のタイミングのとき、システムクロックの時刻にRTC25の時刻を合わせる。RTC設定部212は、例えば、検出部213がオン情報を出力したとき、システムクロックの時刻にRTC25の時刻を合わせる。RTC設定部212は、検出部213がオフ情報を出力したとき、またはその後にRTC25が割り込みハンドラを起動したとき、RTC25の時刻(オフ時刻)を取得して記憶部27に記憶させる。RTC設定部212は、検出部213がオン情報を出力したとき、またはその後にRTC25が割り込みハンドラを起動したとき、RTC25の時刻(オン時刻)を取得して記憶部27に記憶させる。 The RTC setting unit 212 adjusts the time of the RTC 25 to the time of the system clock at a predetermined timing. The RTC setting unit 212 adjusts the time of the RTC 25 to the time of the system clock, for example, when the detection unit 213 outputs the ON information. The RTC setting unit 212 acquires the time (off time) of the RTC 25 and stores it in the storage unit 27 when the detection unit 213 outputs the off information or when the RTC 25 activates the interrupt handler thereafter. The RTC setting unit 212 acquires the time (on time) of the RTC 25 and stores it in the storage unit 27 when the detection unit 213 outputs the ON information or when the RTC 25 activates the interrupt handler thereafter.

検出部213は、メンテナンス等の何らかの要因により、タイムサーバー2がオフ状態にされたこと、およびオン状態にされたことを検出する。検出部213は、タイムサーバー2がオフ状態にされたことを示すオフ情報をRTC設定部212に出力する。検出部213は、タイムサーバー2がオン状態にされたことを示すオン情報をRTC設定部212に出力する。 The detection unit 213 detects that the time server 2 has been turned off and turned on due to some factor such as maintenance. The detection unit 213 outputs off information indicating that the time server 2 has been turned off to the RTC setting unit 212. The detection unit 213 outputs on information indicating that the time server 2 has been turned on to the RTC setting unit 212.

時差算出部214は、RTC25が割り込みハンドラを起動したとき、RTC25の時刻(オフ時刻)とシステムクロックとの時差を第1時差として算出し、算出した第1時差を記憶部27に記憶させる。RTC設定部212(時刻設定部)は、再起動後、RTC25が割り込みハンドラを起動したとき、RTC25の時刻(オン時刻)を取得し、取得した時刻(オン時刻)とオフ時刻との第2時差を算出する。RTC設定部212は、算出した第2時差が、記憶部27が記憶する時差閾値以内であるか否かを判別する。RTC設定部212は、第2時差が時差閾値以内である場合、オン時刻を、第1時差を用いて補正し、補正した時刻情報を計時部211へ出力する。RTC設定部212は、第2時差が時差閾値より大きい場合、時刻を計時部211へ出力しない。ここで、時差閾値は、RTC25の誤差に基づく時間であり、例えば数時間である。例えば、RTC25の誤差が±5ppmであり、1日あたり±400[ms]の場合、タイムサーバー2に許容される誤差が±100[ms]程度であれば、100/400、すなわち6時間(=24時間/4)が時差閾値である。すなわち、本実施形態では、RTC25が発する時刻(割り込みハンドラを起動したとき)について、((オン時刻)−(オフ時刻))<時差閾値の関係を保てる場合に、オフ時にずれていた時間を加算することで、再起動後の時刻を補正する。 When the RTC 25 activates the interrupt handler, the time difference calculation unit 214 calculates the time difference between the RTC 25 time (off time) and the system clock as the first time difference, and stores the calculated first time difference in the storage unit 27. The RTC setting unit 212 (time setting unit) acquires the time (on time) of the RTC25 when the RTC25 activates the interrupt handler after restarting, and the second time difference between the acquired time (on time) and the off time. Is calculated. The RTC setting unit 212 determines whether or not the calculated second time difference is within the time difference threshold value stored by the storage unit 27. When the second time difference is within the time difference threshold value, the RTC setting unit 212 corrects the on time using the first time difference, and outputs the corrected time information to the time measuring unit 211. When the second time difference is larger than the time difference threshold value, the RTC setting unit 212 does not output the time to the time measuring unit 211. Here, the time difference threshold is the time based on the error of RTC25, for example, several hours. For example, if the error of RTC25 is ± 5 ppm and ± 400 [ms] per day, if the error allowed by the time server 2 is about ± 100 [ms], 100/400, that is, 6 hours (=). 24 hours / 4) is the time difference threshold. That is, in the present embodiment, when the relationship of ((on time)-(off time)) <time difference threshold can be maintained for the time (when the interrupt handler is activated) issued by RTC25, the time shifted at the time of off is added. By doing so, the time after restarting is corrected.

時刻取得部22は、例えば、GPS3、テレホンJJY4、長波JJY5、FM時報6のうち少なくとも1つの時刻源から時刻を取得し、取得した時刻情報を制御部21へ出力する。
発振回路23は、例えば水晶発振器を含む。発振回路23は、発振器と組み合わせることで第1の周波数の信号を生成し、生成した第1の周波数の信号を制御部21に出力する。第1の周波数は、例えば500[MHz]〜1[GHz]である。なお、発振器は、TCXO(温度補償水晶発振器)、OCXO(恒温槽付水晶発振器)等であってもよい。
The time acquisition unit 22 acquires the time from at least one time source of, for example, GPS3, telephone JJY4, long wave JJY5, and FM time signal 6, and outputs the acquired time information to the control unit 21.
The oscillation circuit 23 includes, for example, a crystal oscillator. The oscillation circuit 23 generates a signal of the first frequency by combining with the oscillator, and outputs the generated signal of the first frequency to the control unit 21. The first frequency is, for example, 500 [MHz] to 1 [GHz]. The oscillator may be TCXO (temperature-compensated crystal oscillator), OCXO (crystal oscillator with a constant temperature bath), or the like.

RTC25は、RTC設定部212によって所定のタイミングで時刻が設定される。なお、RTC25に書き込める時刻および読み出せる時刻は、例えば秒単位である。RTC25は、時刻設定後、自部で時刻を計時する。RTC25は、所定の時間毎(例えば秒毎)、時刻を更新したときに、割り込みハンドラを起動する。RTC25は、タイムサーバー2の電源がオフ状態の間も、補助電源26からの電力を用いて時間を計時する。なお、RTC25の時間の常温での精度は、例えば±5ppmであり、1日あたり±400[ms]である。
補助電源26は、例えば、二次電池、電気二重層キャパシタ等のスーパーキャパシタである。
The time of the RTC 25 is set at a predetermined timing by the RTC setting unit 212. The time that can be written to the RTC 25 and the time that can be read are, for example, in seconds. After setting the time, the RTC25 measures the time by itself. The RTC 25 activates an interrupt handler when the time is updated at predetermined time intervals (for example, every second). The RTC 25 measures the time using the power from the auxiliary power supply 26 even while the power of the time server 2 is off. The accuracy of RTC25 at room temperature is, for example, ± 5 ppm, which is ± 400 [ms] per day.
The auxiliary power supply 26 is, for example, a supercapacitor such as a secondary battery or an electric double layer capacitor.

記憶部27は、タイムサーバー2の制御に必要なプログラム、時差閾値、RTC25とシステムクロックとの第1時差、オフ時刻を記憶する。
通信部28は、制御部21の制御に応じて、時刻情報を、ネットワーク8を介してクライアント7へ提供する。
The storage unit 27 stores the program required for controlling the time server 2, the time difference threshold value, the first time difference between the RTC 25 and the system clock, and the off time.
The communication unit 28 provides the time information to the client 7 via the network 8 according to the control of the control unit 21.

次に、時刻設定の手順例を、図3〜図5を用いて説明する。
図3は、本実施形態に係る再起動時の処理例を示すシーケンス図である。図4は、本実施形態に係る電源がオフ状態にされたときの処理例を示すフローチャートである。図5は、本実施形態に係る電源がオン状態にされたときの処理例を示すフローチャートである。
図3において、横軸は時刻を表す。ここで、RTC25の精度は±5ppm、タイムサーバーに許容される誤差は±100[ms]とし、その結果、時差閾値は6時間であるものとする。
Next, an example of the time setting procedure will be described with reference to FIGS. 3 to 5.
FIG. 3 is a sequence diagram showing an example of processing at the time of restart according to the present embodiment. FIG. 4 is a flowchart showing a processing example when the power supply according to the present embodiment is turned off. FIG. 5 is a flowchart showing a processing example when the power supply according to the present embodiment is turned on.
In FIG. 3, the horizontal axis represents time. Here, it is assumed that the accuracy of the RTC25 is ± 5 ppm, the error allowed for the time server is ± 100 [ms], and as a result, the time difference threshold is 6 hours.

まず、電源がオフ状態にされたときの手順例を、図3と図4を用いて説明する。
(ステップS1)RTC設定部212は、検出部213がオフ情報を出力したとき、計時部211が計時したシステムクロックの時刻を取得し、取得した時刻の秒以下を切り捨てた時刻を記憶部27に記憶させる。図3の例では、取得した時刻が1:23:45.89(1時23分45.89秒)であり、記憶部27に記憶される記憶が1:23:45(1時23分45秒)である。
First, an example of the procedure when the power is turned off will be described with reference to FIGS. 3 and 4.
(Step S1) When the detection unit 213 outputs the off information, the RTC setting unit 212 acquires the time of the system clock clocked by the clock unit 211, and stores the time obtained by rounding down the seconds or less of the acquired time in the storage unit 27. Remember. In the example of FIG. 3, the acquired time is 1: 23: 45.89 (1:23:45.89 seconds), and the memory stored in the storage unit 27 is 1:23:45 (1:23:45). Seconds).

(ステップS2)RTC設定部212は、取得した時刻にRTC25の時刻を合わせる。これにより、図3に示す例では、RTC設定部212は、RTC25の時刻を1:23:45(1時23分45秒)に合わせる(設定する)。 (Step S2) The RTC setting unit 212 adjusts the time of the RTC 25 to the acquired time. As a result, in the example shown in FIG. 3, the RTC setting unit 212 sets (sets) the time of the RTC 25 to 1:23:45 (1:23:45).

(ステップS3)RTC25は、秒を更新したときに割り込みハンドラを起動する。図3に示す例では、1:23:46.00(1時23分46.00秒)のとき、割り込みハンドラが起動される。 (Step S3) The RTC25 activates an interrupt handler when the seconds are updated. In the example shown in FIG. 3, the interrupt handler is activated at 1:23: 46.00 (1:23:46.00).

(ステップS4)時差算出部214は、RTC25から割り込みハンドラが起動されたときのシステムクロックの時刻とRTC25の時刻を取得し、取得した時刻をオフ時刻として記憶部27に記憶させる。図3に示す例では、システムクロックの時刻が1:23:46.67(1時23分46.67秒)であり、RTC25の時刻が1:23:46(1時23分46秒)である。 (Step S4) The time difference calculation unit 214 acquires the time of the system clock when the interrupt handler is activated from the RTC 25 and the time of the RTC 25, and stores the acquired time in the storage unit 27 as an off time. In the example shown in FIG. 3, the system clock time is 1: 23: 46.67 (1:23:46.67) and the RTC25 time is 1:23:46 (1:23:46). is there.

(ステップS5)時差算出部214は、RTC25の時刻とシステムクロックとの時差を第1時差として算出し、算出した第1時差を記憶部27に記憶させる。図3に示す例では、RTC25の時刻が1:23:46.00であり、システムクロックの時刻が1:23:46.67であるため、第1時差が0.67である。 (Step S5) The time difference calculation unit 214 calculates the time difference between the time of the RTC 25 and the system clock as the first time difference, and stores the calculated first time difference in the storage unit 27. In the example shown in FIG. 3, the time of RTC25 is 1: 23: 46.00 and the time of the system clock is 1: 23: 46.67, so that the first time difference is 0.67.

次に、電源がオン状態にされたときの手順例を、図3と図5を用いて説明する。なお、図3に示す例では、シャットダウンされていた期間(電源がオフ状態の期間)が1分1秒間である。 Next, an example of the procedure when the power is turned on will be described with reference to FIGS. 3 and 5. In the example shown in FIG. 3, the shutdown period (the period in which the power is off) is 1 minute and 1 second.

(ステップS11)RTC25は、シャットダウンされている期間、補助電源26の電力によって計時を継続する。続けて、RTC25は、秒を更新したときに割り込みハンドラを起動する。図3に示す例では、RTC25は、1:24:47.00(1時24分47.00秒)のとき、割り込みハンドラを起動する。 (Step S11) The RTC 25 continues timing with the power of the auxiliary power source 26 during the shutdown period. Subsequently, the RTC 25 activates the interrupt handler when the second is updated. In the example shown in FIG. 3, the RTC25 activates the interrupt handler at 1:24:47.00 (1:24:47.00).

(ステップS12)RTC設定部212は、RTC25が割り込みハンドラを起動したときのRTC25の時刻を取得し、取得した時刻をオン時刻として記憶部27に記憶させる。図3に示す例では、RTC25の時刻が1:23:47(1時23分47秒)である。 (Step S12) The RTC setting unit 212 acquires the time of the RTC 25 when the RTC 25 activates the interrupt handler, and stores the acquired time in the storage unit 27 as an on time. In the example shown in FIG. 3, the time of RTC25 is 1:23:47 (1:23:47).

(ステップS13)RTC設定部212は、オン時刻とオフ時刻との第2時差を算出し、算出した第2時差が時差閾値以内であるか否かを判別する。RTC設定部212は、第2時差が時差閾値以内であると判定した場合、オン時刻に第1時差を加算して補正する。図3に示す例では、オフ時刻とオン時刻との第2時差が1分1秒(=1:24:47−1:23:46)であり、時差閾値(6時間)以下であるため、オン時刻1:24:47.00に第1時差の0.67を加算して時刻を1:24:47.67(1時24分47.67秒)に補正する。 (Step S13) The RTC setting unit 212 calculates the second time difference between the on time and the off time, and determines whether or not the calculated second time difference is within the time difference threshold value. When the RTC setting unit 212 determines that the second time difference is within the time difference threshold value, the RTC setting unit 212 adds the first time difference to the on time to correct it. In the example shown in FIG. 3, the second time difference between the off time and the on time is 1 minute and 1 second (= 1: 24: 47-1: 23: 46), which is equal to or less than the time difference threshold (6 hours). The time is corrected to 1: 24: 47.67 (1:24:47.67) by adding the first time difference of 0.67 to the on time of 1: 24: 47.00.

(ステップS14)RTC設定部212は、補正した時刻にシステムクロックに設定する。図3に示す例では、RTC設定部212は、システムクロックを1:24:47.67(1時24分47.67秒)に設定する。 (Step S14) The RTC setting unit 212 sets the system clock at the corrected time. In the example shown in FIG. 3, the RTC setting unit 212 sets the system clock to 1: 24: 47.67 (1:24:47.67 seconds).

以上のように、本実施形態では、RTC25とシステムクロックとの時差をシャットダウン直前に取得し、再起動後に自走しているRTC25の時刻に時差を加算してシステムクロックとして運用するようにした。ここで、第1時差は、シャットダウン直前のものであるため、再起動後、RTC25をこの時差で補正した時刻の精度は、シャットダウン直前の時刻の精度である。すなわち、実施形態によれば、再起動後に設定されるシステムクロックの精度は、シャットダウン直前の同等の精度を実現することができる。
これにより、時刻情報を取得できるまで、このように補正したシステムクロックを用いて、サービスの提供を継続することができる。タイムサーバー2が、GPS3からしか時報を取得できない場合は、全てのデータを受信して時刻の情報を使用できるまで、最大12.5分かかる。また、タイムサーバー2が、FM時報6からしか時報を取得できない場合は、時報が1時間に一回のため、再起動後、次に時報を取得できるまで最大59分59秒かかる。このような場合であっても、本実施形態によれば、シャットダウンされている時間がRTC25に誤差に基づいて許容範囲内であれば、再起動後であっても直ちにサービスの提供を再開することができる。また、シャットダウンの直前に、従来技術のように高精度なタイミングでRTC25に時刻を書き込む処理が不要であり、タイムサーバー2としての作業負荷も軽減できる。
As described above, in the present embodiment, the time difference between the RTC25 and the system clock is acquired immediately before shutdown, and the time difference is added to the time of the RTC25 running on its own after restarting to operate as the system clock. Here, since the first time difference is immediately before shutdown, the accuracy of the time when the RTC25 is corrected by this time difference after restarting is the accuracy of the time immediately before shutdown. That is, according to the embodiment, the accuracy of the system clock set after the restart can be the same as the accuracy immediately before the shutdown.
As a result, the service can be continued to be provided by using the system clock corrected in this way until the time information can be acquired. If the time server 2 can only acquire the time signal from GPS 3, it takes up to 12.5 minutes to receive all the data and use the time information. If the time server 2 can only acquire the time signal from the FM time signal 6, it takes a maximum of 59 minutes and 59 seconds after the restart to acquire the next time signal because the time signal is once an hour. Even in such a case, according to the present embodiment, if the shutdown time is within the permissible range based on the error in RTC25, the service provision is resumed immediately even after the restart. Can be done. Further, immediately before shutdown, it is not necessary to write the time to the RTC 25 at a highly accurate timing as in the prior art, and the workload of the time server 2 can be reduced.

<変形例>
ここで、図3に示した処理の変形例を説明する。
図3を用いて説明した例では、制御部21が、シャットダウン前にシステムクロックの時刻をRTC25へ書き込み、その後、RTC25が秒を更新したときに時差を取得するようにしたが、これに限られない。RTC25は、毎秒毎に割り込みハンドラを起動しているため、毎秒、システムクロックとRTC25との時差を記憶するようにしてもよい。
図6は、本実施形態に係る再起動時の処理の変形例を示すシーケンス図である。なお、図6に示す例では、ステップS21の前に、システムクロックの時刻をRTC25へ書き込んである。
<Modification example>
Here, a modified example of the process shown in FIG. 3 will be described.
In the example described with reference to FIG. 3, the control unit 21 writes the system clock time to the RTC25 before shutdown, and then acquires the time difference when the RTC25 updates the seconds, but this is limited to this. Absent. Since the RTC 25 activates the interrupt handler every second, the time difference between the system clock and the RTC 25 may be stored every second.
FIG. 6 is a sequence diagram showing a modified example of the process at the time of restart according to the present embodiment. In the example shown in FIG. 6, the time of the system clock is written to the RTC 25 before step S21.

(ステップS21)RTC設定部212は、秒毎に割り込みハンドラを起動する。
(ステップS22)時差算出部214は、RTC25が割り込みハンドラを起動したときのシステムクロックの時刻とRTC25の時刻を取得し、取得した時刻をオフ時刻として記憶部27に記憶させる。
(Step S21) The RTC setting unit 212 activates the interrupt handler every second.
(Step S22) The time difference calculation unit 214 acquires the time of the system clock when the RTC 25 activates the interrupt handler and the time of the RTC 25, and stores the acquired time in the storage unit 27 as an off time.

(ステップS23)RTC設定部212は、秒毎に割り込みハンドラを時差算出部214へ出力する。
(ステップS24)時差算出部214は、RTC25が割り込みハンドラを起動したときのシステムクロックの時刻とRTC25の時刻を取得し、取得したオフ時刻を記憶部27に上書きして更新する。図6に示す例では、ステップS24で算出した第1時差が、シャットダウン直前のシステムクロックとRTC25の時差である。なお、時差算出部214は、1秒前(ステップS22)に算出した時差と、現在(ステップS24)との時差を比較し、変化していない場合は、記憶部27に算出した第1時差を書き込まないようにしてもよい。
(Step S23) The RTC setting unit 212 outputs an interrupt handler to the time difference calculation unit 214 every second.
(Step S24) The time difference calculation unit 214 acquires the time of the system clock when the RTC 25 activates the interrupt handler and the time of the RTC 25, overwrites the acquired off time with the storage unit 27, and updates the time. In the example shown in FIG. 6, the first time difference calculated in step S24 is the time difference between the system clock immediately before shutdown and the RTC25. The time difference calculation unit 214 compares the time difference calculated one second ago (step S22) with the current time difference (step S24), and if there is no change, the time difference calculated in the storage unit 27 is used for the first time difference. You may not write it.

(ステップS25〜ステップS28)RTC25とRTC設定部212は、ステップS25〜S28の処理をステップS11〜S14の処理と同様に行う。 (Steps S25 to S28) The RTC25 and the RTC setting unit 212 perform the processes of steps S25 to S28 in the same manner as the processes of steps S11 to S14.

以上のように、図6に示した変形例によれば、毎秒、システムクロックとRTC25との時差を算出して記憶部27に記憶させるようにした。これにより、変形例によれば、毎秒、時差を更新しているため、シャットダウン直前の時差を記憶部27に保持することができ、この保持された時差を用いてRTC25から取得した時刻を補正してサービスの提供を継続することができる。再起動後にシステムクロックに設定される時刻の精度は、シャットダウン直前に取得したRTC25の時刻を、システムクロックとRTC25の時差で補正した時刻の精度であるため、シャットダウン前のシステムクロックの時刻の精度と同等である。すなわち、変形例においても、再起動後に設定されるシステムクロックの精度は、シャットダウン直前の精度と同等である。
このため変形例によれば、RTC25の時刻が仮に1年以上ずれていたとしても、時差を毎秒更新しているため、シャットダウンの直前を意識した特別な処理は不要であり、保持された時差を用いてRTC25から取得した時刻を補正してサービスの提供を継続することができる。
As described above, according to the modification shown in FIG. 6, the time difference between the system clock and the RTC 25 is calculated every second and stored in the storage unit 27. As a result, according to the modified example, since the time difference is updated every second, the time difference immediately before shutdown can be held in the storage unit 27, and the time acquired from the RTC 25 is corrected using this held time difference. And can continue to provide services. The accuracy of the time set in the system clock after restart is the accuracy of the time obtained by correcting the time of RTC25 acquired immediately before shutdown by the time difference between the system clock and RTC25, so it is the accuracy of the time of the system clock before shutdown. Equivalent. That is, even in the modified example, the accuracy of the system clock set after the restart is the same as the accuracy immediately before the shutdown.
Therefore, according to the modified example, even if the time of RTC25 is deviated by one year or more, the time difference is updated every second, so that no special processing is required in consideration of immediately before shutdown, and the retained time difference can be determined. It can be used to correct the time acquired from the RTC 25 and continue to provide the service.

なお、上述した例では、時刻出力装置としてタイムサーバー2を例に説明したが、これに限られない。図2の構成の時刻出力装置を、パーソナルコンピュータ、サーバー、タブレット端末、携帯電子機器等に適用することもできる。 In the above-mentioned example, the time server 2 has been described as an example of the time output device, but the present invention is not limited to this. The time output device having the configuration shown in FIG. 2 can also be applied to a personal computer, a server, a tablet terminal, a portable electronic device, or the like.

なお、本発明における制御部21の機能の全てまたは一部を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより制御部21が行う処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータシステム」は、ホームページ提供環境(あるいは表示環境)を備えたWWWシステムも含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバーやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。 A program for realizing all or a part of the functions of the control unit 21 in the present invention is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed. As a result, the processing performed by the control unit 21 may be performed. The term "computer system" as used herein includes hardware such as an OS and peripheral devices. Further, the "computer system" shall also include a WWW system provided with a homepage providing environment (or display environment). Further, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, or a CD-ROM, or a storage device such as a hard disk built in a computer system. Furthermore, a "computer-readable recording medium" is a volatile memory (RAM) inside a computer system that serves as a server or client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. In addition, it shall include those that hold the program for a certain period of time.

また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。また、上記プログラムは、前述した機能の一部を実現するためのものであってもよい。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。 Further, the program may be transmitted from a computer system in which this program is stored in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the "transmission medium" for transmitting a program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. Further, the above program may be for realizing a part of the above-mentioned functions. Further, it may be a so-called difference file (difference program) that can realize the above-mentioned function in combination with a program already recorded in the computer system.

1…時刻管理システム、2…タイムサーバー、3…GPS、4…テレホンJJY、5…長波JJY、6…FM時報、7,7−1,7−2,7−3…クライアント、21…制御部、22…時刻取得部、23…発振回路、25…RTC、26…補助電源、27…記憶部、28…通信部、211…計時部、212…RTC設定部、213…検出部、214…時差算出部 1 ... Time management system, 2 ... Time server, 3 ... GPS, 4 ... Telephone JJY, 5 ... Long wave JJY, 6 ... FM time signal, 7,7-1,7-2,7-3 ... Client, 21 ... Control unit , 22 ... Time acquisition unit, 23 ... Oscillation circuit, 25 ... RTC, 26 ... Auxiliary power supply, 27 ... Storage unit, 28 ... Communication unit, 211 ... Time signal unit, 212 ... RTC setting unit, 213 ... Detection unit, 214 ... Time difference Calculation unit

Claims (5)

時刻を計時する第1計時部と、
時刻を計時し、所定時刻毎に割り込み信号を出力し、電源がオフ状態の間も計時を継続する第2計時部と、
前記割り込み信号が出力されたとき、前記第1計時部が計時した時刻と、前記第2計時部が計時した時刻との時差を第1時差として算出して保持する時差算出部と、
自装置が再起動され、前記割り込み信号が出力されたとき、前記第2計時部が計時した時刻に前記第1時差を加算して補正した時刻を前記第1計時部に設定する時刻設定部と、
を備え
前記時刻設定部は、電源がオフ状態になるとき、前記第1計時部が計時した時刻を前記第2計時部に設定し、
前記第2計時部は、前記第1計時部が計時した時刻が設定された後に秒を更新したとき、割り込み信号を出力する時刻出力装置。
The first timekeeping part that measures the time and
The second clock section that clocks the time, outputs an interrupt signal at predetermined time intervals, and continues timing even when the power is off.
When the interrupt signal is output, the time difference calculation unit calculates and holds the time difference between the time measured by the first timekeeping unit and the time measured by the second timekeeping unit as the first time difference.
When the own device is restarted and the interrupt signal is output, the time setting unit that sets the time corrected by adding the first time difference to the time measured by the second time unit in the first time unit. ,
Equipped with a,
When the power is turned off, the time setting unit sets the time measured by the first time unit to the second time unit.
Said second time counting unit, when the first clock unit updates the seconds after being set time of clocking, the time output device you output an interrupt signal.
前記第1計時部は、所定のタイミングで標準時刻に設定され、前記標準時刻に基づいて第1の精度で時刻を計時し、
前記第2計時部は、前記第1の精度よりも低い第2の精度で時刻を計時する、請求項1に記載の時刻出力装置。
The first time unit is set to a standard time at a predetermined timing, and the time is measured with the first accuracy based on the standard time.
The time output device according to claim 1, wherein the second time unit measures the time with a second accuracy lower than the first accuracy.
前記時刻設定部は、
電源がオフ状態になるときの前記第2計時部が計時した時刻と、電源がオン状態になったときの前記第2計時部が計時した時刻との時差を第2時差として算出し、算出した前記第2時差が閾値以内の場合、自装置が再起動され、前記割り込み信号が出力されたとき、前記第2計時部が計時した時刻に前記第1時差を加算して補正した時刻を前記第1計時部に設定する、請求項1または請求項2に記載の時刻出力装置。
The time setting unit
The time difference between the time measured by the second time section when the power is turned off and the time measured by the second time section when the power is turned on is calculated and calculated as the second time difference. When the second time difference is within the threshold value, when the own device is restarted and the interrupt signal is output, the time corrected by adding the first time difference to the time measured by the second time unit is the time corrected. 1 The time output device according to claim 1 or 2, which is set in the time section.
前記閾値は、前記第2計時部が計時する時刻の誤差に基づき、前記時刻出力装置に許容される誤差以内となる時間である、請求項に記載の時刻出力装置。 The time output device according to claim 3 , wherein the threshold value is a time within an error allowed by the time output device based on an error in the time measured by the second time unit. 時刻を計時する第1計時部と、時刻を計時し、電源がオフ状態の間も計時を継続する第2計時部と、を有する時刻出力装置の時刻出力方法であって、
第2計時部が、所定時刻毎に割り込み信号を出力するステップと、
時差算出部が、前記割り込み信号が出力されたとき、前記第1計時部によって計時した時刻と、前記第2計時部によって計時した時刻との時差を第1時差として算出して保持する時差算出ステップと、
時刻設定部が、自装置が再起動され、前記割り込み信号が出力されたとき、前記第2計時部によって計時した時刻に前記第1時差を加算して補正した時刻を前記第1計時部に設定するステップと、
前記時刻設定部が、電源がオフ状態になるとき、前記第1計時部が計時した時刻を前記第2計時部に設定するステップと、
前記第2計時部が、前記第1計時部が計時した時刻が設定された後に秒を更新したとき、割り込み信号を出力するステップと、
を含む時刻出力方法。
It is a time output method of a time output device having a first time unit that measures the time and a second time unit that measures the time and continues the time measurement even when the power is off.
The step that the second timekeeping part outputs an interrupt signal at predetermined time intervals,
When the interrupt signal is output, the time difference calculation unit calculates and holds the time difference between the time measured by the first time unit and the time measured by the second time unit as the first time difference. When,
When the own device is restarted and the interrupt signal is output, the time setting unit sets the time corrected by adding the first time difference to the time measured by the second time unit in the first time unit. Steps to do and
When the time setting unit turns off the power, the step of setting the time measured by the first timekeeping unit to the second timekeeping unit, and
A step of outputting an interrupt signal when the second clock unit updates the seconds after the time measured by the first clock unit is set.
Time output method including.
JP2017048110A 2017-03-14 2017-03-14 Time output device and time output method Active JP6869058B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017048110A JP6869058B2 (en) 2017-03-14 2017-03-14 Time output device and time output method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017048110A JP6869058B2 (en) 2017-03-14 2017-03-14 Time output device and time output method

Publications (2)

Publication Number Publication Date
JP2018151274A JP2018151274A (en) 2018-09-27
JP6869058B2 true JP6869058B2 (en) 2021-05-12

Family

ID=63680946

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017048110A Active JP6869058B2 (en) 2017-03-14 2017-03-14 Time output device and time output method

Country Status (1)

Country Link
JP (1) JP6869058B2 (en)

Also Published As

Publication number Publication date
JP2018151274A (en) 2018-09-27

Similar Documents

Publication Publication Date Title
US7701390B2 (en) Time adjustment device, timekeeping device with a time adjustment device, and a time adjustment method
JP4600480B2 (en) Electronic clock
JP5428167B2 (en) Time correction device, time measuring device with time correction device, and time correction method
JP6435762B2 (en) Electronic device, program, and date / time information acquisition method
EP2487550B1 (en) Electronic timepiece and reception control method for an electronic timepiece
JP5374912B2 (en) Time correction device, time measuring device with time correction device, and time correction method
US9869977B2 (en) Radio-controlled timepiece
JP6327183B2 (en) Radio wave receiver, radio wave clock, signal acquisition method and program
JP2009145318A (en) Time adjustment device, timepiece with time adjustment device, and time adjustment method
US9448539B2 (en) Electronic timepiece and reception control method of an electronic timepiece
JP6772700B2 (en) Positioning equipment, electronic clocks, positioning control methods, and programs
US9952561B2 (en) Radio timepiece, method for acquiring leap second correction information and recording medium
JP6040670B2 (en) Electronic clock and satellite signal receiving method of electronic clock
JP6508096B2 (en) Satellite radio wave receiver, radio wave clock, date and time information output method, and program
JP3796380B2 (en) Time correction information output device and automatic time correction clock
JP6888575B2 (en) Electronic clock and information acquisition method
JP6583353B2 (en) Electronic clock, date acquisition control method and program
JP6131554B2 (en) Electronic clock and satellite signal receiving method of electronic clock
JP6394008B2 (en) Electronic clock and date data correction method
JP6869058B2 (en) Time output device and time output method
US7064619B1 (en) Method and apparatus for restarting a GPS-based timing system without a GPS signal
JP6866760B2 (en) Electronic clock, date and time acquisition control method and program
JP6493574B2 (en) Radio wave receiver, radio wave clock, signal acquisition method and program
JP2009036673A (en) Time adjustment device, time measuring device with time adjustment device, and time adjustment method
JPH07318669A (en) Dual clock system for information machine

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20181102

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200114

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210105

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210302

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210323

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210413

R150 Certificate of patent or registration of utility model

Ref document number: 6869058

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250