项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

20 lines
592 B

  1. import { async } from '../scheduler/async';
  2. import { map } from './map';
  3. /**
  4. * @param scheduler
  5. * @return {Observable<Timestamp<any>>|WebSocketSubject<T>|Observable<T>}
  6. * @method timestamp
  7. * @owner Observable
  8. */
  9. export function timestamp(scheduler = async) {
  10. return map((value) => new Timestamp(value, scheduler.now()));
  11. // return (source: Observable<T>) => source.lift(new TimestampOperator(scheduler));
  12. }
  13. export class Timestamp {
  14. constructor(value, timestamp) {
  15. this.value = value;
  16. this.timestamp = timestamp;
  17. }
  18. }
  19. ;
  20. //# sourceMappingURL=timestamp.js.map