Skip to content

Commit

Permalink
chore: Cleanup timestamp setting blocks in samples (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicain authored Dec 7, 2021
1 parent a5622fc commit ce36b19
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
12 changes: 0 additions & 12 deletions packages/google-cloud-videointelligence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,6 @@ labels.forEach(label => {
console.log(`Label ${label.entity.description} occurs at:`);
label.segments.forEach(segment => {
segment = segment.segment;
if (segment.startTimeOffset.seconds === undefined) {
segment.startTimeOffset.seconds = 0;
}
if (segment.startTimeOffset.nanos === undefined) {
segment.startTimeOffset.nanos = 0;
}
if (segment.endTimeOffset.seconds === undefined) {
segment.endTimeOffset.seconds = 0;
}
if (segment.endTimeOffset.nanos === undefined) {
segment.endTimeOffset.nanos = 0;
}
console.log(
`\tStart: ${segment.startTimeOffset.seconds}` +
`.${(segment.startTimeOffset.nanos / 1e6).toFixed(0)}s`
Expand Down
12 changes: 0 additions & 12 deletions packages/google-cloud-videointelligence/samples/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,6 @@ async function main() {
console.log(`Label ${label.entity.description} occurs at:`);
label.segments.forEach(segment => {
segment = segment.segment;
if (segment.startTimeOffset.seconds === undefined) {
segment.startTimeOffset.seconds = 0;
}
if (segment.startTimeOffset.nanos === undefined) {
segment.startTimeOffset.nanos = 0;
}
if (segment.endTimeOffset.seconds === undefined) {
segment.endTimeOffset.seconds = 0;
}
if (segment.endTimeOffset.nanos === undefined) {
segment.endTimeOffset.nanos = 0;
}
console.log(
`\tStart: ${segment.startTimeOffset.seconds}` +
`.${(segment.startTimeOffset.nanos / 1e6).toFixed(0)}s`
Expand Down

0 comments on commit ce36b19

Please sign in to comment.