Invention content
The application's is designed to provide a kind of browser clocking method and system, to improve client browser timing
Accuracy.
A kind of browser clocking method, including:
The web page code that client browser reading service device is sent;
Client browser executes the web page code, with triggering initialization timer events and when showing timing on the page
Between;
After present timing event, client browser according to the total degree of triggering timing event, minimum timing cycle and
The total time being actually passed through from starting to execute web page code calculate the time interval for triggering timer events next time;
When time interval of the client browser Jing Guo the calculating, timer events next time described in triggering.
In preferred embodiment, the total time being actually passed through from starting to execute web page code is according to present timing event knot
The real time of client and the real time of client when starting to execute web page code are calculated when beam.
In preferred embodiment, the total degree of the triggering timing event is recorded by client;The present timing event terminates
When client real time and start execute web page code when client real time recorded by client.
A kind of browser clocking method, including:
The web page code that client browser reading service device is sent;
Client browser executes the web page code, with triggering initialization timer events and when showing timing on the page
Between;
After present timing event, client browser according to the total degree of triggering timing event, minimum timing cycle and
The total time being actually passed through from reading web page code calculate the time interval of triggering timing event next time;
When time interval of the client browser Jing Guo the calculating, triggering timer events next time.
In preferred embodiment, the total time being actually passed through from reading web page code reads net according to client browser
The real time of client is calculated at the end of the real time of client and present timing event when page code.
In preferred embodiment, when using AJAX technologies, the reality of client when the client browser reads web page code
The border time, including:The real time of client when client obtains and uses the response of server;Or, server is being handled
The real time of client when the request of client.
In preferred embodiment, taken when reading web page code comprising the minimum timing cycle and client in the web page code
The time of business device.
In preferred embodiment, the total degree of the triggering timing event is recorded by client;Client browser reads webpage
The real time of client is recorded by client at the end of the real time of client and present timing event when code.
In preferred embodiment, client browser executes the web page code, with triggering initialization timer events and in the page
Upper display timing time, specifically includes:Client browser executes the web page code to be shown on the page in a manner of reverse countdown
Timing show the time;Or, client browser executes the web page code to show the timing in a manner of countdown on the page
Show the time.
In preferred embodiment,
The timing of the reverse countdown mode shows that the determination method of time includes:The client is set and reads web page code
When server time be client browser page timing fiducial time, calculate the beginning timing time on the server
With the time difference of the fiducial time, the timing that the time difference is reverse countdown mode is set and shows the time;
The timing of the countdown mode shows that the determination method of time includes:The client is set and reads web page code
When server time be client browser page timing fiducial time, calculate the cut-off timing time on the server
With the time difference of the fiducial time, the timing that the time difference is countdown mode is set and shows the time.
In preferred embodiment, the present timing event, including:Previous timer events terminate to execute after minimum timing cycle
Timer events;Or, previous timer events terminate to be computed what the triggering of gained executed after timer events time interval next time
Timer events.
A kind of browser timekeeping system, including:Web page code reading unit starts execution unit, time interval calculating list
Member, timing execution unit, recording unit;Wherein,
The web page code reading unit, the web page code sent for reading service device;Include in the web page code
Start timing on the time of server and minimum timing cycle and server when timing code, client read web page code
End timing time on time or server;
The beginning execution unit, the web page code read for starting execution web page code reading unit, with triggering
Initialization timer events simultaneously show timing time on the page;
The time interval computing unit is used for after present timing event, according to the total degree of triggering timing event, most
Small timing cycle and the total time being actually passed through from starting to execute web page code, calculate the time for triggering timer events next time
Interval;
The timing execution unit, for after the time interval of calculating, triggering the timing thing next time of the page
Part;
The recording unit, at the end of recording present timing event, the total degree of triggering timing event starts to execute
When web page code at the end of the real time of client and present timing event client real time, and by the data of record
It is back to time interval computing unit.
In preferred embodiment, the time interval computing unit, including:Total time computing unit, interval calculation unit;Its
In,
The total time timing unit, the reality of client when starting to execute web page code for being returned according to recording unit
The real time of client at the end of border time and present timing event calculates from starting to execute code to present timing event knot
The total time that beam client is passed through;
The interval calculation unit, for according to minimum timing cycle, recording unit records triggering timing event it is total
It the total time being actually passed through from starting to execute web page code that number and total time timing unit timing obtain, calculates under triggering
The time interval of timer events.
In preferred embodiment, the time recording unit, including:Data record unit, data returning unit;Wherein,
The data record unit, client when for recording the total degree of triggering timing event, starting to execute web page code
The real time of client at the end of the real time at end and present timing event;
The data returning unit, the data for recording data record unit are back to time interval computing unit.
A kind of browser timekeeping system, including:Web page code reading unit starts execution unit, the second time interval meter
Calculate unit, timing execution unit, the second recording unit;Wherein,
The web page code reading unit, the web page code sent for reading service device;Include in the web page code
Start timing on the time of server and minimum timing cycle and server when timing code, client read web page code
End timing time on time or server;
The beginning execution unit, the web page code read for starting execution web page code reading unit, with triggering
Initialization timer events simultaneously show timing time on the page;
The second time interval computing unit is used for after present timing event, according to total time of triggering timing event
Number, minimum timing cycle and the total time being actually passed through from client browser reads web page code, calculate triggering next time
The time interval of timer events;
The timing execution unit, for after the time interval of calculating, triggering the timing thing next time of the page
Part;
Second recording unit, at the end of recording present timing event, the total degree of triggering timing event, client
Hold browser read web page code when client real time and present timing event at the end of client real time, and
The data of record are back to the second time interval computing unit.
In preferred embodiment, the second time interval computing unit, including:Second total time computing unit, second interval
Computing unit;Wherein,
The second total time timing unit, client when reading web page code for being returned according to the second recording unit
Real time and present timing event at the end of client real time, calculate from web page code is read to present timing thing
Part terminates the total time of client process;
The second interval calculation unit, for the triggering timing according to minimum timing cycle, the second recording unit records
The total time being actually passed through from reading web page code that the total degree of event and the timing unit timing of the second total time obtain, meter
Calculate the time interval for triggering timer events next time.
In preferred embodiment, the second time recording unit, including:Second data record unit, the second data return single
Member;Wherein,
Second data record unit, for recording the total degree of triggering timing event, client browser reads net
Page code when client real time and present timing event at the end of client real time;The client browser
The real time of client, the reality of client when being obtained using client and using the response of server when reading web page code
Time, or, handling the real time of client when the request of client using server;
The second data returning unit, the data for recording the second data record unit were back between the second time
Every computing unit.
A kind of browser clocking method provided by the present application and system, client browser and server by internet into
After clock synchronization of row, according to the total degree of triggering timing, first time interval and the total time being actually passed through, it can calculate current
Triggering timing event terminates to the time interval of triggering timing event next time, by change next time triggering timing event when
Between interval come eliminate it is current execute timing error existing for client browser after timer events, the browser clocking method can
It is accumulated with preventing from executing the error that code generates, after client browser carries out a clock synchronization with server, client is clear
Device of looking at needs not rely on internet and high-precision timing can be realized.
In addition, using AJAX technologies when, if when client being obtained and using the response of server client reality
The real time of client when time reads web page code as client browser, it can eliminate and read web page code to opening
Beginning executes the time difference during web page code.If the real time that server is being handled to client when the request of client is made
The real time of client, can also further eliminate network error when reading web page code for client browser so that use
It is more accurate in the value for calculating the total time being actually passed through at triggering timing interval next time, ensure browser timing page timing
Precisely.
Specific implementation mode
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality
The attached drawing in example is applied, technical solutions in the embodiments of the present application is clearly and completely described, it is clear that described implementation
Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common
The every other embodiment that technical staff is obtained without creative efforts should all belong to the application protection
Range.
Fig. 1 is a kind of flow chart of browser clocking method embodiment of the application.As shown in Figure 1, the browser timing
Method, including:
S101:The web page code that client browser reading service device is sent.
The web page code that client browser is sent by internet and server communication, reading service device.The webpage
The time of server and minimum timing cycle when in code can include timing code, client reading web page code, and clothes
Start to end timing time on timing time or server on business device.
Dynamic clocking effect can be shown by executing the timing code.The timing code is write to may be used
Javascript language can also use other that can realize the script of dynamic web page function.
The minimum timing cycle is the Unit alteration amount of the time shown on the timing page.
For example, the minimum timing cycle for including in the web page code is 1 second, then the time shown on the timing page
Unit alteration amount is 1 second, i.e., each triggering timing event, and the time span shown on the timing page all changes 1 second.If positive meter
When, then the time span shown on the timing page increases by 1 second.If countdown, then the time span shown on the timing page subtracts
It is 1 second few.
Start timing time or server on the time of server and server when the client reads web page code
Upper cut-off timing time can be used for calculating the display time of the client browser timing page.
S102:Client browser executes the web page code, shows with triggering initialization timer events and on the page
Timing time.
Client browser executes the web page code after reading the web page code.The web page code includes
Timing code, initialization timer events can be triggered and show timing time on the page by executing the web page code.It is described
Initialization timer events are not counted in the total degree of triggering timing.
The timing time of the display is calculated according to the time for the server being contained in web page code.It is described aobvious
The timing time shown can be that the timing of reverse countdown mode shows the time, and the timing that can also be countdown mode shows the time.
The timing of the reverse countdown mode shows the time, according on server beginning timing time and described be contained in net
The time of server in page code calculates.It specifically includes:The time of the server being contained in web page code is made
For the fiducial time of client browser page timing, the beginning timing time on the server and the fiducial time are calculated
Time difference, the time difference be reverse countdown mode timing show the time.
The timing of the countdown mode shows the time, according on server cut-off timing time and described be contained in net
The time of server in page code calculates.It specifically includes:The time of the server being contained in web page code is made
For the fiducial time of client browser page timing, the cut-off timing time on the server and the fiducial time are calculated
Time difference, the time difference be countdown mode timing show the time.
Show that the above-mentioned timing being calculated shows time, and triggering timing event.It, can by executing the timing code
To change the display time on the timing page, the length of the display time change is minimum timing cycle.
If for example, reverse countdown mode, the minimum timing cycle for including in web page code is 1 second, when server time is 5
30 points 45 seconds, 0 divides 0 second when the timing time started is 5 on server, then the display time of the browser timing page is 30 point 45
Second, after triggering timing event, the display time of the timing page is changed to 30 points 46 seconds.If countdown mode, in web page code
Including minimum timing cycle be 1 second, server time 30 divides 45 seconds when being 5, when the deadline of countdown is 6 on server
0 point 0 second, then the display time of the browser timing page be 29 points 15 seconds, after triggering timing event, the display time of the timing page
It is changed to 29 points 14 seconds.
S103:After present timing event, client browser is according to the total degree of triggering timing event, minimum timing
Interval and the total time being actually passed through from starting to execute web page code, calculate the time interval for triggering timer events next time.
As described in the background art, error can all be generated by executing timing code every time.It is described after timing code is performed a plurality of times
It executes the error that timing code generates to be accumulated, error can reach hundreds of milliseconds even several seconds.Client browser is being read
Web page code this process for taking that server sends can be because network data transmission generates network error, generally several milliseconds.Phase
For the error for executing timing code and generating of accumulation, the network error can be ignored.Clothes are received in client browser
It after the web page code that business device is sent, usually immediately begins to execute the web page code, client browser reception can be ignored
To web page code to start execute web page code during time difference.Therefore, the present embodiment, which only considers how to eliminate, executes timing
The error that code generates.
In order to eliminate the error that the execution timing code generates, can utilize from starting to execute web page code to current meter
When event terminate, this accurate principle of the real time that client is passed through calculated between the triggering time of timer events next time
Every.By adjusting the time interval of triggering timer events next time, can eliminate at the end of present timing event due to executing meter
When code generate timing error.It the total degree of the triggering timing event and is actually passed through from starting to execute web page code
Total time can be recorded by client.
It is described to calculate the time interval for triggering timer events next time, following formula can be passed through and calculate acquisition:
Tn+1=(n+1)*Δt-(newtime-basetime)(1)
In above formula, n indicates the total degree of current triggering timing event;Δ t indicates minimum timing cycle, i.e., triggering is counted every time
When event after the length changed of time for showing of the timing page;Client when basetime indicates to start to execute web page code
Real time;The real time of client at the end of newtime expression present timing events;(newtime-basetime)It indicates
Terminate the total time being actually passed through to present timing event from starting to execute web page code.Tn+1Indicate present timing event knot
Shu Zhi(n+1)The time interval of secondary triggering timing event, that is, trigger the time interval of timer events next time.It is described
The value of basetime and the value of newtime can be recorded by client.As n=0, T1=Δt-(newtime-basetime), T1
Indicate the time interval to first time triggering timing event after the initialization page shows the time.
Such as:Minimum timing cycle in web page code is 1 second.
At the end of 100th timer events, the total time that client is actually passed through from starting to execute web page code is
100800 milliseconds, expression terminates the error that common property gives birth to 800 milliseconds from execution web page code to the 100th timer events are started.Root
According to formula(1)The 100th timer events are calculated after the completion to the time interval for triggering the 11st timer events, result of calculation is:
T101=101*1000-100800=200 millisecond, indicate setting present timing event terminate to the 101st timer events of triggering when
Between between be divided into 200 milliseconds.
The present timing event can be the timing thing that previous timer events terminate to execute after minimum timing cycle
Part.The present timing time can also be that previous timer events terminate to be computed the triggering of gained next time between timer events
Every the timer events of rear execution.
S104:When time interval of the client browser Jing Guo the calculating, triggering timer events next time change timing
The time shown on the page.
Client browser can trigger the timing thing next time of the page in the time interval Jing Guo the calculating
Part executes timing code, changes the time shown on the timing page.The time change shown on the page is completed to indicate present timing
Event terminates
Such as:Minimum timing cycle in web page code is 1 second.
At the end of 1st timer events, if client is from starting to execute web page code to first time triggering timing event knot
Beam, the total time that client is actually passed through are 1010 milliseconds, indicate the error for having 10 milliseconds at present.According to formula(1)Calculate the 1st
Time interval when after the completion of secondary timer events to the 2nd triggering timing event, result of calculation are:T2=2*1000-1010=990
Millisecond indicates that setting present timing event terminates to be divided into 990 milliseconds between next triggering timing event, can eliminate above-mentioned 10
Millisecond error.The 2nd timer events are triggered when so, 990 milliseconds after the 1st timer events, execute timing code, more
Change the time shown on the timing page.
After 2nd triggering timing event, if the total time that client is actually passed through from after the reading web page code
It it is 2080 milliseconds, then it represents that have 80 milliseconds of error at present.According to formula(1)The 2nd timer events are calculated after the completion to the 3rd time
The time interval of triggering timing event, result of calculation are:T3=3*1000-2080=920 millisecond indicate setting present timing event
Terminate to be divided into 920 milliseconds between next triggering timing event, above-mentioned 80 milliseconds of errors can be eliminated.So, in the 2nd timing
3rd triggering timing event at 920 milliseconds after event executes timing code, changes the time shown on the timing page.
And so on ...
After 10th triggering timing event, if the total time that client is actually passed through from after the reading web page code
It it is 10200 milliseconds, then it represents that have 200 milliseconds of error at present.According to formula(1)It calculates after the completion of the 10th timer events to the
The time interval of 11 triggering timing events, result of calculation are:T11=11*1000-10200=800 millisecond indicate the current meter of setting
When event terminate to be divided into 800 milliseconds between next triggering timing event, above-mentioned 200 milliseconds of errors can be eliminated.So,
11st triggering timing event when 800 milliseconds after 10 timer events executes timing code, changes on the timing page and shows
Time.
The browser clocking method embodiment, client browser carry out a clock synchronization with server by internet
Afterwards, according to the total degree of triggering timing, first time interval and the total time being actually passed through, current triggering timing thing can be calculated
Part terminates to the time interval of triggering timing event next time, is disappeared by changing the time interval of triggering timing event next time
Except timing error, the browser clocking method existing for client browser after current execution timer events can prevent from executing
The error that code generates is accumulated, and after client browser carries out a clock synchronization with server, client browser does not need
It relies on internet and high-precision timing can be realized.
Fig. 2 is a kind of composite structural diagram of browser timekeeping system embodiment of the application.As shown in Fig. 2, the browser
Timekeeping system includes:Web page code reading unit 100 starts execution unit 200, time interval computing unit 300, timing execution
Unit 400, recording unit 500.Wherein,
The web page code reading unit 100, the web page code sent for reading service device;It can in the web page code
It is opened on the time of server and minimum timing cycle and server when reading web page code comprising timing code, client
End timing time on beginning timing time or server.
The beginning execution unit 200, the web page code read for starting execution web page code reading unit 100,
Timing time is shown with triggering initialization timer events and on the page.
The time interval computing unit 300 is used for after present timing event, according to total time of triggering timing event
Number, minimum timing cycle and the total time being actually passed through from starting to execute web page code, calculate triggering timer events next time
Time interval.
The timing execution unit 400, for after the time interval of calculating, triggering the timing next time of the page
Event.
The recording unit 500, at the end of recording present timing event, the total degree of triggering timing event starts
When executing web page code at the end of the real time of client and present timing event client real time, and by record
Data are back to time interval computing unit 300.
Fig. 3 is the composite structural diagram of time interval computing unit in a kind of browser timekeeping system embodiment of the application.Such as
Shown in Fig. 3, the time interval computing unit 300, including:Total time computing unit 310, interval calculation unit 320.Wherein,
The total time timing unit 310, client when starting to execute web page code for being returned according to recording unit 500
The real time of client at the end of the real time at end and present timing event calculates from starting to execute code to present timing
Event terminates the total time of client process.
The interval calculation unit 320, the triggering timing thing for being recorded according to minimum timing cycle, recording unit 500
The total time being actually passed through from starting to execute web page code that the total degree of part and 310 timing of total time timing unit obtain,
Calculate the time interval for triggering timer events next time.
Fig. 4 is the composite structural diagram of recording unit in a kind of browser timekeeping system embodiment of the application.As shown in figure 4,
The time recording unit 500, including:Data record unit 510, data returning unit 520.Wherein,
The data record unit 510, visitor when for recording the total degree of triggering timing event, starting to execute web page code
The real time of client at the end of the real time at family end and present timing event.
The data returning unit 520, the data for recording data record unit 510 are back to time interval calculating
Unit 300.
The browser timekeeping system embodiment is corresponding with browser clocking method embodiment, and the browsing may be implemented
Device clocking method, after ensureing client browser and server by a clock synchronization, client browser needs not rely on interconnection
High-precision timing can be realized in net.
The second embodiment of the application browser clocking method is described below:
One skilled in the art will appreciate that the ends common customer can be wrapped by internet to the process of server request data
It includes:Blocking(Request is blocked)、Sending(Request is sent)、Waiting(Wait-for-response)、Receiving(It receives
Response), the execution content corresponding to the Four processes is as shown in table 1;
The process of 1 network request of table
Process |
The corresponding content executed |
Blocking |
Parsing DNS, HTTP request is established |
Sending |
Request data is sent |
Waiting |
Server is connected to request, start to process request |
Receiving |
Server is to client transmission data |
The process of the web page code of client reading service device can pass through AJAX(Asynchronous JavaScript and XML
(Asynchronous JavaScript And XML))Solicited status indicate.The AJAX passes through in backstage and server
Low volume data exchange is carried out, webpage can be made to realize asynchronous refresh, you can is right in the case where not reloading entire webpage
Certain part of webpage is updated.
The solicited status of the AJAX usually indicates that the variable R eady State are length with variable R eady State
Degree is digital for 4 integer.The solicited status of the AJAX includes 5 states, and the state of 5 states is explained specifically such as table 2
It is shown.
Table 2AJAX solicited status and state are explained
In conjunction with embodiment shown in FIG. 1, in the example using AJAX technologies, the web page code of client reading service device
When, can record Ready State states be 4 when client real time, by the Ready State states be 4 when visitor
The real time at family end is as formula(1)The value of middle basetime.Timing next time is triggered after the time interval calculated
Event, can not only eliminate execute timing code generate error, can also eliminate read web page code to start execute net
Time difference during page code.
The time that waiting processes in table 1 need refers to the time of server customer in response end request, described
Time needed for waiting processes can correspond to time when Ready State states are 2 in AJAX request state in table 2,
For the web page code of client reading service device during this, the time needed for the waiting processes is generally very short, usually small
In 5 milliseconds.Time needed for the receiving processes can be 3 with Ready State states in corresponding A JAX solicited status~
Time when 4, when Ready State states are 3~4 in the time or AJAX request state needed for the receiving processes
Time-dependent network speed determine, if network speed is very fast, the time needed for this process is less, if network speed compared with
Slowly, then the time needed for this process is more.
Fig. 5 is the schematic diagram of the application client time axis, server time axis and Ready State state relations.Such as
Shown in Fig. 5, server is sent to the server time in the web page code of client included to be Ready State states when being 2
Time, but when client browser reads the web page code of the server, the real time of client is Ready
The time that State states are 4, such calculation formula(1)When the total time that middle client is passed through, Ready State shapes are will produce
Error when state is 3~4, the error are known as network error.If recording client when Ready State states are 2
The real time at end, the real time that client when the Ready State states are 2 is arranged is formula(1)In
The value of basetime can further eliminate the network error.
Therefore, in conjunction with embodiment shown in FIG. 1, in the example using AJAX technologies, the net of client reading service device
When page code, the real time of client when Ready State states are 2 can also be recorded, by the Ready State states
The real time of client is as formula when being 2(1)The value of middle basetime.It is triggered after the time interval calculated next
Secondary timer events, can not only eliminate execute timing code generate error and read web page code to start execute webpage generation
Time difference during code, network error can also be eliminated.
Fig. 6 is the flow chart of the application browser clocking method second embodiment.As shown in fig. 6, the browser timing
The second of method is implemented, and may include:
S601:The web page code that client browser reading service device is sent;
S602:Client browser executes the web page code, shows with triggering initialization timer events and on the page
Timing time;
S603:After present timing event, client browser is according between the total degree of triggering timing event, minimum timing
Every with total time for being actually passed through from reading web page code, calculate the time interval of triggering timing event next time;
S604:When time interval of the client browser Jing Guo the calculating, triggering timer events next time.
Wherein,
S603 is calculated using following formula and is obtained:
Tn+1=(n+1)*Δt-(newtime-basetime1)(2)
In above formula, n indicates the total degree of current triggering timing event;Δ t indicates minimum timing cycle, i.e., triggering is counted every time
When event after the length changed of time for showing of the timing page;Basetime1 indicates that client browser reads web page code
When client real time;The real time of client at the end of newtime expression present timing events;(newtime-
basetime1)Indicate the total time being actually passed through from client browser reads web page code.Tn+1Indicate present timing
Event terminates to(n+1)The time interval of secondary triggering timing event, that is, trigger the time interval of timer events next time.When n=
When 0, T1=Δt-(newtime-basetime), T1To first time triggering timing event after the expression initialization page display time
Time interval.The value of the basetime1 and the value of newtime can be recorded by client.
It, the real time of client when the client browser reads web page code, can be with when using AJAX technologies
Use Ready State states for 4 when client real time, i.e., client can obtain and using server sound
The real time of seasonable client.The real time of client, can also adopt when the client browser reads web page code
With Ready State states be 2 when client real time, i.e., client when server is handling the request of client
The real time at end.
The present embodiment other parts are identical with the first embodiment of browser clocking method, are referred to the first browsing
The first embodiment of device clocking method, is not repeated herein explanation.
The second embodiment of above-mentioned a kind of browser clocking method, when using AJAX technologies, if by the Ready
The real time of client when the real time of client reads web page code as client browser when State states are 4,
Can eliminate read web page code to start execute web page code during time difference.If being 2 by Ready State states
When client real time as client browser read web page code when client real time, can also be into one
Step eliminates network error so that and the value for calculating the total time being actually passed through at triggering timing interval next time is more accurate,
Ensure that browser timing page timing is accurate.
The second embodiment of the application browser timekeeping system is described below.Fig. 7 is the application browser timekeeping system
The composite structural diagram of two embodiments.As shown in fig. 7, the browser timekeeping system includes:Web page code reading unit 100 is opened
Beginning execution unit 200, the second time interval computing unit 600, timing execution unit 400, the second recording unit 700.Wherein,
The web page code reading unit 100, the web page code sent for reading service device.It can in the web page code
It is opened on the time of server and minimum timing cycle and server when reading web page code comprising timing code, client
End timing time on beginning timing time or server.
The beginning execution unit 200, the web page code read for starting execution web page code reading unit 100,
Timing time is shown with triggering initialization timer events and on the page.
The second time interval computing unit 600 is used for after present timing event, according to the total of triggering timing event
Number, minimum timing cycle and the total time being actually passed through from client browser reads web page code, it is next to calculate triggering
The time interval of secondary timer events.
The timing execution unit 400, for after the time interval of calculating, triggering the timing next time of the page
Event.
Second recording unit 700, at the end of recording present timing event, the total degree of triggering timing event,
Client browser read web page code when client real time and present timing event at the end of client it is practical when
Between, and the data of record are back to the second time interval computing unit 600.
Fig. 8 is the composed structure of the second time interval computing unit in the application browser timekeeping system second embodiment
Figure.As shown in figure 8, the second time interval computing unit 600, including:Second the 610, second interval of total time computing unit
Computing unit 620.Wherein,
The second total time timing unit 610, when reading web page code for being returned according to the second recording unit 700
The real time of client at the end of the real time of client and present timing event calculates from web page code is read to current
Timer events terminate the total time of client process.
The second interval calculation unit 620 is touched for what is recorded according to minimum timing cycle, the second recording unit 700
Send out timer events total degree and second total time 610 timing being actually passed through from reading web page code of obtaining of timing unit
Total time calculate the time interval for triggering timer events next time.
Fig. 9 is the composite structural diagram of the second recording unit in the application browser timekeeping system second embodiment.Such as Fig. 9 institutes
Show, the second time recording unit 700, including:Second data record unit 710, the second data returning unit 720.Wherein,
Second data record unit 710, for recording the total degree of triggering timing event, client browser is read
When web page code at the end of the real time of client and present timing event client real time.The Client browse
The real time of client, may be used client when client obtains and uses the response of server when device reads web page code
Real time, the real time of server client when handling the request of client can also be used.
The second data returning unit 720, the data for recording the second data record unit 710 are back to second
Time interval computing unit 600.
The browser timekeeping system second embodiment is corresponding with browser clocking method second embodiment, may be implemented
The corresponding effect of the browser clocking method second embodiment.
In the 1990s, it is improvement on hardware that the improvement of a technology, which can be distinguished clearly,(For example,
Improvement to circuit structures such as diode, transistor, switches)Or the improvement on software(Improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device,PLD)(Such as field programmable gate array(Field Programmable Gate
Array, FPGA))It is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker
Dedicated IC chip 2.Moreover, nowadays, substitution manually makes IC chip, and this programming is also used instead mostly
" logic compiler(logic compiler)" software realizes that when it writes with program development software compiler used is similar
Seemingly, and the source code before compiling also handy specific programming language is write, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language)Deng most generally using VHDL at present(Very-High-Speed
Integrated Circuit Hardware Description Language)With Verilog2.Those skilled in the art
It will be apparent to the skilled artisan that only needing method flow slightly programming in logic and being programmed into integrated circuit with above-mentioned several hardware description languages
In, so that it may to be readily available the hardware circuit for realizing the logical method flow.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
Device and storage can be by these(It is micro-)The computer readable program code that processor executes(Such as software or firmware)Computer can
Read medium, logic gate, switch, application-specific integrated circuit(Application Specific Integrated Circuit,
ASIC), programmable logic controller (PLC) and embedded microcontroller form, the example of controller includes but not limited to following microcontroller
Device:ARC625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited
Memory controller is also implemented as a part for the control logic of memory.
It is also known in the art that other than realizing controller in a manner of pure computer readable program code, it is complete
Entirely can by by method and step carry out programming in logic come so that controller with logic gate, switch, application-specific integrated circuit, programmable
The form of logic controller and embedded microcontroller etc. realizes identical function.Therefore this controller is considered one kind
Hardware component, and the structure that the device for realizing various functions for including in it can also be considered as in hardware component.Or
Even, can will be considered as realizing the device of various functions either the software module of implementation method can be Hardware Subdivision again
Structure in part.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit is realized can in the same or multiple software and or hardware when application.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can
It is realized by the mode of software plus required general hardware platform.Based on this understanding, the technical solution essence of the application
On in other words the part that contributes to existing technology can be expressed in the form of software products, in a typical configuration
In, computing device includes one or more processors (CPU), input/output interface, network interface and memory.The computer is soft
Part product may include that some instructions are used so that a computer equipment(Can be personal computer, server or network
Equipment etc.)Execute the method described in certain parts of each embodiment of the application or embodiment.The computer software product can
To store in memory, memory may include the volatile memory in computer-readable medium, random access memory
(RAM) and/or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer
The example of readable medium.Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be by
Any method or technique realizes information storage.Information can be computer-readable instruction, data structure, the module of program or its
His data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), fast flash memory bank or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or
Other magnetic storage apparatus or any other non-transmission medium can be used for storage and can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include of short duration computer readable media (transitory media), such as modulation
Data-signal and carrier wave.
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment
Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method
Part explanation.
The application can be used in numerous general or special purpose computing system environments or configuration.Such as:Personal computer, clothes
Business device computer, handheld device or portable device, laptop device, multicomputer system, microprocessor-based system, set
Top box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer including any of the above system or equipment
Distributed computing environment etc..
The application can describe in the general context of computer-executable instructions executed by a computer, such as program
Module.Usually, program module includes routines performing specific tasks or implementing specific abstract data types, program, object, group
Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these distributed computing environments, by
Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage device.
Although depicting the application by embodiment, it will be appreciated by the skilled addressee that the application there are many deformation and
Variation is without departing from spirit herein, it is desirable to which the attached claims include these deformations and change without departing from the application's
Spirit.