ObjFW  Check-in [77e8aff469]

Overview
Comment:Fix a very stupid typo in -[OFDate timeIntervalSinceDate:].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 77e8aff46951d38448e33d78687f8c92e5b53671f0aa378ddcfd62a356bc6b78
User & Date: js on 2011-01-11 21:56:29
Other Links: manifest | tags
Context
2011-01-11
21:56
Some systems don't allow usleep for values > 1000000. check-in: 2fb2ff521f user: js tags: trunk
21:56
Fix a very stupid typo in -[OFDate timeIntervalSinceDate:]. check-in: 77e8aff469 user: js tags: trunk
20:01
Fix a documentation bug in OFDate. check-in: 904971ac2b user: js tags: trunk
Changes

Modified src/OFDate.m from [31a8bddc6c] to [d1491b40fa].

461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
	int32_t usec_ = (int32_t)usec - date->usec;

	while (usec_ > 999999) {
		usec_ -= 1000000;
		sec_++;
	}

	while (usec < 0) {
		usec_ += 1000000;
		sec_--;
	}

	return sec_;
}

- (uint32_t)microsecondsOfTimeIntervalSinceDate: (OFDate*)date
{
	int32_t usec_ = (int32_t)usec - date->usec;

	while (usec_ > 999999)
		usec_ -= 1000000;

	while (usec < 0)
		usec_ += 1000000;

	return usec_;
}

- (OFDate*)dateByAddingTimeInterval: (int64_t)sec_
{







|














|







461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
	int32_t usec_ = (int32_t)usec - date->usec;

	while (usec_ > 999999) {
		usec_ -= 1000000;
		sec_++;
	}

	while (usec_ < 0) {
		usec_ += 1000000;
		sec_--;
	}

	return sec_;
}

- (uint32_t)microsecondsOfTimeIntervalSinceDate: (OFDate*)date
{
	int32_t usec_ = (int32_t)usec - date->usec;

	while (usec_ > 999999)
		usec_ -= 1000000;

	while (usec_ < 0)
		usec_ += 1000000;

	return usec_;
}

- (OFDate*)dateByAddingTimeInterval: (int64_t)sec_
{