Skip to content

Commit

Permalink
Adjust animation and logo size
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 23, 2017
1 parent f58801b commit 7ed6759
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions docs/date/timestamp.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Creating timestamp

We have different approach for measure time, depending on the environment where we are running the code.
We have different approach for measuring time, depending on the environment where we are running the code.

## Using `Date`

Expand All @@ -15,22 +15,24 @@ Althought both have the same output, but `Date.now()` is faster because you are

This is specially remarkable when you make successive calls (for example, when you append timestamps in logs).

Another thing to consider is the fact that, when you create a new Date() you are linking a specific point in time with the object. Therefore, successive calls to .getTime() will have the same output.
Another thing to consider is the fact that, when you create a `new Date()` you are linking a specific point in time with the object.

Therefore, successive calls to .getTime() will have the same output.

```js
var time = new Date()
time.getTime() // => 1472153262516
time.getTime() // => 1472153262516
```

The limitation of use `Date` is that the mimimum quantity of time is limited to one-millisecond resolution, while using browser/server API's methods for high resolution timming you can get resolution in order of nanoseconds.
The limitation of use `Date` is that the minimum quantity of time you are measuring is limited to *one-millisecond* resolution, while using browser/server API's methods for high resolution timing you can get resolutions in order of nanoseconds.

## Using `perfomance.now`

The [performance.now()](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) perform a high resolution time accurate to five thousandths of a millisecond (5 microseconds).

## Using `process.hrtime`

THe [process.hrtime](https://nodejs.org/api/process.html#process_process_hrtime_time) returns high-resolution real time in *[seconds, nanoseconds]* `Array`.
Using [process.hrtime](https://nodejs.org/api/process.html#process_process_hrtime_time) means that the reported time will be monotonically increasing, and not subject to [clock drifts](https://en.wikipedia.org/wiki/Clock_drift).

The time `Array` is relative to an arbitrary time in the past (not related to the time of day) and therefore not subject to [clock drifts](https://en.wikipedia.org/wiki/Clock_drift).
It returns high-resolution real time `Array` as *[seconds, nanoseconds]*.
8 changes: 4 additions & 4 deletions docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,8 @@ pre:after {

.logo-container {
position: relative;
width: 256px;
height: 256px;
height: 35vh;
max-height: 400px;
display: block;
margin: 0 auto;
}
Expand Down Expand Up @@ -1043,7 +1043,7 @@ pre:after {
}

.eyelid {
animation: blink 5s infinite alternate;
animation: blink 1.5s infinite alternate;
}
.eye--left .eyelid {
transform-origin: top right;
Expand Down Expand Up @@ -1188,7 +1188,7 @@ pre:after {

@keyframes blink {
0%,
97% {
95% {
transform: translateY(-18px);
}
100% {
Expand Down

0 comments on commit 7ed6759

Please sign in to comment.