code: func Span(marker interface{}, name string, args Args) func(args Args) {
  	c := getContext(marker)
  	if c == nil {
  		return dummy
  	}
  	tsStart := time.Since(consts.start)
  	return func(argsEnd Args) {
  		tsEnd := time.Since(consts.start)
  		if tsEnd == tsStart {
  			// Make sure a duration event lasts at least one nanosecond.
  			// It is a problem on systems with very low resolution clock
  			// like Windows where the clock is so coarse that a large
  			// number of events would not show up on the UI.
  			tsEnd++
  		}
  		// Use a pair of eventBegin/eventEnd.
  		// getID() is a locking call.
  		id := getID()
  		// Remove once https://github.com/google/trace-viewer/issues/963 is rolled
  		// into Chrome stable.
  		if args == nil {
  			args = consts.fakeArgs
  		}
  		if argsEnd == nil {
  			argsEnd = consts.fakeArgs
  		}
  		c.emit(&event{
  			Type:      eventNestableBegin,
  			Category:  "ignored",
  			Name:      name,
  			Args:      args,
  			Timestamp: fromDuration(tsStart),
  			ID:        id,
  		})
  		c.emit(&event{
  			Type:      eventNestableEnd,
  			Category:  "ignored",
  			Name:      name,
  			Args:      argsEnd,
  			Timestamp: fromDuration(tsEnd),
  			ID:        id,
  		})
  	}
  }
docs: // Span defines an event with a duration.
  //
  // The caller MUST call the returned callback to 'close' the event. The
  // callback doesn't need to be called from the same goroutine as the initial
  // caller.