Skip to content

Commit

Permalink
Merge pull request #46 from mario-bermonti:fix-sessionID
Browse files Browse the repository at this point in the history
Improve sessionID created by createSessionID()
  • Loading branch information
mario-bermonti committed Mar 6, 2024
2 parents 718dbdf + 28770c9 commit 81b8f12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions lib/src/data_manager/session_id_creator.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
String createSessionID(
{required String participantID, required String startTime}) {
final String sessionID = participantID + startTime;
/// Create a unique [String] identifier by concatenating the [participantID]
/// with the current time.
String createSessionID({required String participantID}) {
final DateTime startTime = DateTime.now();
final String sessionID = "${participantID}_${startTime.toString()}";

return sessionID;
}
1 change: 0 additions & 1 deletion lib/src/services/run_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ void runSession(
/// session id for both practice and experimental data.
final String sessionID = createSessionID(
participantID: participantID,
startTime: TimeOfDay.now().toString(),
);

DigitSpanTaskData data = await taskRunner(
Expand Down

0 comments on commit 81b8f12

Please sign in to comment.